Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dark grey dropdown button #588

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nasty-dots-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@status-im/components": patch
---

add dark grey dropdown button
26 changes: 14 additions & 12 deletions packages/components/src/dropdown-button/dropdown-button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@ export default {

render: args => (
<div className="grid gap-4">
{(['primary', 'grey', 'outline', 'ghost'] as const).map(variant => (
<div key={variant} className="flex items-center gap-4">
{(['40', '32', '24'] as const).map(size => (
<DropdownButton
key={size}
{...args}
variant={variant}
size={size}
/>
))}
</div>
))}
{(['primary', 'grey', 'darkGrey', 'outline', 'ghost'] as const).map(
variant => (
<div key={variant} className="flex items-center gap-4">
{(['40', '32', '24'] as const).map(size => (
<DropdownButton
key={size}
{...args}
variant={variant}
size={size}
/>
))}
</div>
),
)}
</div>
),
} satisfies Meta<typeof DropdownButton>
Expand Down
6 changes: 5 additions & 1 deletion packages/components/src/dropdown-button/dropdown-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type ButtonProps = Extract<
type Props = ButtonProps & {
variant?: Extract<
ButtonProps['variant'],
'primary' | 'grey' | 'outline' | 'ghost'
'primary' | 'grey' | 'outline' | 'ghost' | 'darkGrey'
>
iconAfter?: never
}
Expand Down Expand Up @@ -53,6 +53,10 @@ const iconStyles = cva({
'text-neutral-100 dark:text-white-100',
'[&>path[fill="#E7EAEE"]]:dark:fill-neutral-80',
],
darkGrey: [
'text-neutral-100 dark:text-white-100',
'[&>path[fill="#E7EAEE"]]:dark:fill-neutral-80',
],
Comment on lines +56 to +59
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the difference of this variant to the grey one?

Copy link
Collaborator

@prichodko prichodko Oct 1, 2024

Choose a reason for hiding this comment

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

these styles affect the icon, button styles are in the <Button />

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nevermind. I'm just tired. Makes total sense. I thought i was looking at <Button /> component. 🤦

},
},
})
Expand Down
Loading