Add display user page

This commit is contained in:
Kurt Hutten
2020-11-04 07:21:47 +11:00
parent a28f126f9c
commit 217cb31ed2
11 changed files with 132 additions and 12 deletions

View File

@@ -0,0 +1,17 @@
import Svg from 'src/components/Svg'
const Button = ({onClick, children}) => {
return (
<div>
<button
className="flex items-center bg-indigo-200 bg-opacity-50 rounded-xl p-2 px-6 text-indigo-600"
onClick={onClick}
>
{children}
<Svg className="w-6 ml-4" name="pencil" />
</button>
</div>
)
}
export default Button

View File

@@ -0,0 +1,10 @@
import Button from './Button'
export const generated = () => {
return <>
button with icon
<Button>click Me </Button>
</>
}
export default { title: 'Components/Button' }

View File

@@ -0,0 +1,11 @@
import { render } from '@redwoodjs/testing'
import Button from './Button'
describe('Button', () => {
it('renders successfully', () => {
expect(() => {
render(<Button />)
}).not.toThrow()
})
})