Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

tabs storybook implementation #68

Merged
merged 11 commits into from
Oct 25, 2024
1 change: 1 addition & 0 deletions apps/web/app/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
--button-hover: #a082e9;
--button-stroke: #6947bb;
--button-secondary: #ffffff;
--button-secondary-foreground: #000000;
--button-secondary-stroke: #e6e6e6;
--button-secondary-hover: #efefef;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/tailwind.css

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions apps/web/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ export default {
foreground: 'var(--button-foreground)',
hover: 'var(--button-hover)',
stroke: 'var(--button-stroke)',
secondary: {
DEFAULT: 'var(--button-secondary)',
foreground: 'var(--button-secondary-foreground)',
stroke: 'var(--button-secondary-stroke)',
hover: 'var(--button-secondary-hover)',
},
},
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',
Expand Down
3 changes: 2 additions & 1 deletion packages/ui/components/CheckboxFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export function CheckboxFilter({
<div
key={option}
className="flex w-full cursor-pointer items-center justify-start space-x-2"
onClick={() => handleCheckboxChange(option)}>
// onClick={() => handleCheckboxChange(option)}
>
<Checkbox
id={option}
checked={checkedState[option]}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/shadcn/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const buttonVariants = cva(
outline:
'border border-input hover:bg-accent hover:text-accent-foreground',
secondary:
'bg-button-secondary text-secondary-foreground hover:bg-button-secondary-hover border-button-secondary-stroke border',
'bg-button-secondary text-button-secondary-foreground hover:bg-button-secondary-hover border-button-secondary-stroke border',
ghost: 'hover:bg-accent hover:text-accent-foreground',
link: 'underline-offset-4 hover:underline text-primary',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default {
args: {onApply: fn()},
}

// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
export const Primary = {
args: {
options: ['Accounting', 'ATS', 'Banking', 'Database'],
Expand Down
28 changes: 28 additions & 0 deletions packages/ui/stories/Tabs.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import {Tabs} from '../components/Tabs'

export default {
title: 'Example/Tabs',
component: Tabs,
argTypes: {
tabConfig: {control: 'object'},
Rodri77 marked this conversation as resolved.
Show resolved Hide resolved
defaultValue: {control: 'text'},
},
}

export const Primary = {
args: {
tabConfig: [
{
key: 'connections',
title: 'Connections',
content: <div>Content1</div>,
},
{
key: 'settings',
title: 'Settings',
content: <div>Content2</div>,
},
],
defaultValue: 'connections',
}
}
Loading