Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
clementroche committed Aug 1, 2024
2 parents a56d422 + 502deeb commit 4a235bf
Show file tree
Hide file tree
Showing 6 changed files with 1,715 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/apple-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function Icon() {
justifyContent: 'center',
}}
>
DE
S
</div>
),
// ImageResponse options
Expand Down
2 changes: 1 addition & 1 deletion app/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function Icon() {
justifyContent: 'center',
}}
>
DE
S
</div>
),
// ImageResponse options
Expand Down
28 changes: 28 additions & 0 deletions components/button/button.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Button } from '.'

// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
export default {
title: 'Components/Button',
component: Button,
parameters: {
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
layout: 'centered',
},
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
tags: ['autodocs'],
// More on argTypes: https://storybook.js.org/docs/api/argtypes
argTypes: {},
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
args: {},
}

// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
export const Default = {
render: ({ children, ...props }) => <Button {...props}>{children}</Button>,
args: {
...Button.props,
children: 'Click me!',
onPress: () => alert('Button pressed!'),
className: 'hi-my-name-is',
},
}
14 changes: 14 additions & 0 deletions components/button/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { useRef } from 'react'
import { useButton } from 'react-aria'

export function Button(props) {
let ref = useRef(null)
let { buttonProps } = useButton(props, ref)
const { children, className } = props

return (
<button {...buttonProps} className={className} ref={ref}>
{children}
</button>
)
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"next-sitemap": "^4.2.3",
"postprocessing": "^6.36.0",
"react": "18.3.1",
"react-aria-components": "^1.3.1",
"react-dom": "18.3.1",
"react-use": "^17.5.1",
"sass": "^1.77.8",
Expand Down
Loading

1 comment on commit 4a235bf

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"⚡️ Lighthouse report for the changes in this commit:

🟠 Performance: 71
🟢 Accessibility: 90
🟢 Best practices: 96
🟠 SEO: 63
🔴 PWA: undefined

Lighthouse ran on https://satus-8yv5eg9dt-darkroom-engineering.vercel.app/"

Please sign in to comment.