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

Prefix support #1498

Draft
wants to merge 115 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
02b6a4d
feat: first prefix support implementation with class list generation …
SutuSebastian Oct 11, 2024
347b8ae
chore: drop `tailwindcss-patch` in favor of manual search and parse c…
SutuSebastian Oct 14, 2024
9617f96
convert `class-list.json` to class-list.ts`
SutuSebastian Oct 14, 2024
05217ac
sort `CLASS_LIST_MAP`
SutuSebastian Oct 14, 2024
a3c4e14
cleanup:
SutuSebastian Oct 15, 2024
7781fbd
fix theme extend values
SutuSebastian Oct 15, 2024
c7ce9e5
fix storybook `darkMode` to be `class`
SutuSebastian Oct 15, 2024
a0766af
remove `flowbite/plugin`
SutuSebastian Oct 15, 2024
9c66a31
extend theme instead of override
SutuSebastian Oct 15, 2024
aaca7fc
format
SutuSebastian Oct 15, 2024
21256d3
expose `helpers` and `hooks` too
SutuSebastian Oct 15, 2024
d4096c6
expose all plugin internals
SutuSebastian Oct 15, 2024
4e675ce
fix "Masquerading as CJS"
SutuSebastian Oct 17, 2024
7ccd2fd
fix circular import warning
SutuSebastian Oct 17, 2024
be7f96f
undo `"type": "commonjs"`; check CI
SutuSebastian Oct 17, 2024
2318dc1
redo `"type": "commonjs"`; check CI
SutuSebastian Oct 17, 2024
4e993ab
up root packages
SutuSebastian Oct 17, 2024
e3702c3
bump oven-sh/setup-bun
SutuSebastian Oct 17, 2024
d23754f
up more packages + fix types
SutuSebastian Oct 17, 2024
d6c916b
import type
SutuSebastian Oct 22, 2024
6890260
up packages
SutuSebastian Oct 22, 2024
297e064
remove unused import
SutuSebastian Oct 22, 2024
c41ea1e
rework theming system and add prefix on-the-fly -- [UNSTABLE]
SutuSebastian Oct 25, 2024
7832e11
enhance `applyPrefix`
SutuSebastian Oct 26, 2024
e08d74a
fix derp reversed if-else
SutuSebastian Oct 26, 2024
f8918c9
simplify `resolveTheme`
SutuSebastian Oct 26, 2024
d739163
remove unused import
SutuSebastian Oct 26, 2024
3c722bf
implement `twMerge` proxy with prefix provided from `getStore()`
SutuSebastian Oct 27, 2024
e23c2e3
up some packages; clean next.config.js
SutuSebastian Oct 28, 2024
678638c
deeply merge `theme` objects (from store or props) using `twMerge`
SutuSebastian Oct 28, 2024
c3bd201
resolve unique values
SutuSebastian Oct 29, 2024
de5450b
resolve `deepMergeStrings` unique values
SutuSebastian Oct 29, 2024
1db1f58
improve VSCode settings
SutuSebastian Dec 13, 2024
2d1f9f3
add postcss types
SutuSebastian Dec 18, 2024
c8098e5
vscode settings - preferTypeOnlyAutoImports
SutuSebastian Dec 18, 2024
4917971
deprecate `<Flowbite>` references in favor of `ThemeProvider`; also f…
SutuSebastian Dec 18, 2024
904f5c5
resolveClassList: always return unique list of class names
SutuSebastian Dec 18, 2024
f7ef07a
apps/storybook:
SutuSebastian Dec 19, 2024
fd17ab1
sort extentions
SutuSebastian Dec 19, 2024
4a307a5
up packages
SutuSebastian Dec 19, 2024
4a4b7ee
up `ui` packages
SutuSebastian Dec 19, 2024
2c28209
fix tests
SutuSebastian Dec 19, 2024
26a0212
apps: add namspace to name - avoid collision with existing npm/jsr pa…
SutuSebastian Dec 19, 2024
297c97b
fix tailwindCSS.experimental.configFile
SutuSebastian Dec 19, 2024
8457ce5
- deprecate `resolveTheme` shouldPrefix
SutuSebastian Dec 20, 2024
dcc3954
rename `pluck` to `get`
SutuSebastian Dec 21, 2024
23adf37
finish `resolveUnstyled`; add more JSDoc
SutuSebastian Dec 21, 2024
81707ec
deprecate exporting `getStore()` and only allow finite actions and ge…
SutuSebastian Dec 23, 2024
89aa30c
use react context for `ThemeProvider`
SutuSebastian Dec 23, 2024
42d755e
enhance ThemeProvider to support deep merging of themes and unstyled …
SutuSebastian Dec 23, 2024
3a2e9da
fix build #1
SutuSebastian Dec 23, 2024
91646cb
fix build; fix client/server non-serializable props in docs examples;…
SutuSebastian Dec 23, 2024
5842e15
add `unstyled` to the rest of the components
SutuSebastian Dec 24, 2024
e68b9bd
rename `unstyled` to `resetTheme`
SutuSebastian Dec 24, 2024
fdcfb8c
fix(datepicker): tests
SutuSebastian Dec 24, 2024
7a88193
remove redundant `Flowbite` prefix from types
SutuSebastian Dec 24, 2024
9921b65
remove redundant `Flowbite` prefix from types #2
SutuSebastian Dec 24, 2024
f4a4719
remove unused types; inline 1x usage types
SutuSebastian Dec 24, 2024
29ddb92
enhance `ThemeProvider` with `applyTheme` prop and `root` prop to con…
SutuSebastian Dec 27, 2024
aff03e9
centralize theming system component props into `ThemingProps`
SutuSebastian Dec 27, 2024
224da17
explicit naming convention
SutuSebastian Dec 27, 2024
1c35c0d
implement `applyTheme` to `resolveTheme()`
SutuSebastian Dec 27, 2024
11d2e53
bypass TS inference
SutuSebastian Dec 27, 2024
3d9565f
fix `resolveTheme` jsdoc
SutuSebastian Dec 27, 2024
d7bfbbc
fix TS errors
SutuSebastian Dec 27, 2024
9f6765b
make `root` prop only for `ThemeProviderProps `
SutuSebastian Dec 27, 2024
caa6821
run stricter lint rules + apply fixes
SutuSebastian Dec 28, 2024
4881c04
format + remove unused imports
SutuSebastian Dec 28, 2024
b03938f
add `get()` test
SutuSebastian Dec 28, 2024
ba54036
apply all args to `resolveTheme` #1
SutuSebastian Dec 28, 2024
e9ab272
apply all args to `resolveTheme` #2
SutuSebastian Dec 28, 2024
f134288
fix docs navbar
SutuSebastian Dec 29, 2024
3d2e215
fix: `eslint.workingDirectories` vscode settings
SutuSebastian Dec 29, 2024
6a3c353
refactor: replace react-icons with custom icon components in UI compo…
SutuSebastian Dec 29, 2024
5842cc9
cleanup
SutuSebastian Dec 29, 2024
f454042
chore: update dependencies and bun version to latest
SutuSebastian Dec 29, 2024
e0cd0b8
fix: update suppressHydrationWarning in RootLayout and correct TypeSc…
SutuSebastian Dec 29, 2024
4bcb8b9
docs: update Flowbite React integration instructions in Tailwind CSS …
SutuSebastian Jan 2, 2025
e774041
fix: disable tailwindcss/no-custom-classname rule in various componen…
SutuSebastian Jan 2, 2025
cf6757e
docs: add documentation for customizing Tailwind CSS prefix
SutuSebastian Jan 2, 2025
4046d19
docs: remove redundant list of Flowbite React components from server …
SutuSebastian Jan 2, 2025
5fd7aa9
docs: add documentation for Flowbite React Tailwind CSS plugin and up…
SutuSebastian Jan 2, 2025
16cf93f
docs: update code block line highlight in Flowbite React Tailwind CSS…
SutuSebastian Jan 2, 2025
c2368ba
test: add unit tests for ThemeProvider component
SutuSebastian Jan 2, 2025
84d9cb3
test: add unit tests for ThemeModeScript component
SutuSebastian Jan 2, 2025
1149b93
fix: reorder List item in typography section of docs sidebar
SutuSebastian Jan 2, 2025
2972e96
fix: rename .test. to .spec.
SutuSebastian Jan 2, 2025
b877faa
style: simplify font family configuration and clean up CSS styles
SutuSebastian Jan 4, 2025
40f0933
chore: deprecate compound components (breaking change)
SutuSebastian Jan 5, 2025
9196dba
fix(docs-examples): update fileName from 'client' to 'index'
SutuSebastian Jan 5, 2025
040c75e
refactor: simplify code structure by changing code array to object
SutuSebastian Jan 5, 2025
0b34df5
refactor: rename resetTheme prop to clearTheme for consistency
SutuSebastian Jan 5, 2025
8895d51
style: update visible table of contents styles for improved spacing a…
SutuSebastian Jan 5, 2025
6975519
feat(types): enhance ThemingProps interface with additional theme man…
SutuSebastian Jan 5, 2025
6bad020
style: remove unnecessary padding from table of contents component
SutuSebastian Jan 5, 2025
6f0fdc3
fix crash
SutuSebastian Jan 6, 2025
16c1afb
refactor: remove unused "use client" directives and simplify ButtonGr…
SutuSebastian Jan 6, 2025
0efa366
refactor: replace rimraf with native shell command for output directo…
SutuSebastian Jan 6, 2025
816e441
refactor(ButtonGroup): update class expectations to use grouped class…
SutuSebastian Jan 6, 2025
c6b9dd3
chore: update @types/bun and @types/web to latest versions
SutuSebastian Jan 7, 2025
22bf607
refactor: convert functional components to named function syntax for …
SutuSebastian Jan 8, 2025
9b2cdbd
refactor: update import statements to use type imports for consistency
SutuSebastian Jan 8, 2025
2549801
refactor(theme): export useThemeProvider and additional types from pr…
SutuSebastian Jan 8, 2025
dc9cb6e
refactor(resolve-theme): remove caching mechanism for theme resolution
SutuSebastian Jan 8, 2025
f7ab913
refactor(resolve-theme): remove caching test for theme resolution
SutuSebastian Jan 8, 2025
beca7a8
refactor: create `useResolveTheme` with useMemo wrapper to `resolveTh…
SutuSebastian Jan 8, 2025
4bc4fca
fix(resolveTheme): stable memoization; deep merging granularity
SutuSebastian Jan 9, 2025
7a10f8c
refactor(resolve-theme): optimize theme application logic to prevent …
SutuSebastian Jan 9, 2025
f668c69
refactor(get): improve handling of empty and invalid paths; enhance d…
SutuSebastian Jan 10, 2025
9248255
chore: update dependencies and bun version across
SutuSebastian Jan 10, 2025
9432532
export theme from each component
SutuSebastian Jan 10, 2025
b8cfa11
refactor(Textarea): update storybook default value and placeholder; f…
SutuSebastian Jan 10, 2025
095e2c2
refactor(TextInput): update storybook placeholder; fix theme styles
SutuSebastian Jan 10, 2025
0d8c822
refactor(FileInput): fix theme styles + simplify component JSX
SutuSebastian Jan 11, 2025
3f32f87
refactor(FileInput): drop `helperText` prop and inline it in docs
SutuSebastian Jan 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["storybook", "web"]
"ignore": ["@/storybook", "@/web"]
}
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ runs:
using: composite
steps:
- name: Setup Bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.21
bun-version: 1.1.43

- name: Setup Node
uses: actions/setup-node@v4
Expand Down
10 changes: 5 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"recommendations": [
"oven.bun-vscode",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"yoavbls.pretty-ts-errors",
"bradlc.vscode-tailwindcss",
"DavidAnson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"oven.bun-vscode",
"unifiedjs.vscode-mdx",
"DavidAnson.vscode-markdownlint"
"yoavbls.pretty-ts-errors"
]
}
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"eslint.workingDirectories": ["apps/web", "packages/ui"],
"editor.quickSuggestions": {
"strings": "on"
},
"eslint.workingDirectories": [{ "mode": "auto" }],
"files.associations": {
"*.css": "tailwindcss"
},
"tailwindCSS.classAttributes": ["class", "className", "theme"],
"tailwindCSS.experimental.classRegex": [
["twMerge\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["createTheme\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
],
"tailwindCSS.experimental.configFile": {
"apps/storybook/tailwind.config.cjs": "apps/storybook/**",
"apps/web/tailwind.config.cjs": "apps/web/**",
"packages/ui/tailwind.config.cjs": "packages/ui/**"
},
"typescript.preferences.preferTypeOnlyAutoImports": true,
"typescript.tsdk": "node_modules/typescript/lib"
}
44 changes: 44 additions & 0 deletions apps/storybook/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
env: {
browser: true,
commonjs: true,
es2021: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:tailwindcss/recommended",
"prettier",
],
overrides: [
{
files: ["**/*.{ts,tsx}"],
plugins: ["@typescript-eslint"],
parser: "@typescript-eslint/parser",
extends: ["plugin:@typescript-eslint/recommended"],
},
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["react-refresh"],
settings: {
react: {
version: "detect",
},
tailwindcss: {
callees: ["twMerge", "createTheme"],
classRegex: "^(class(Name)|theme)?$",
},
},
ignorePatterns: ["storybook-static"],
rules: {
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
"react/no-unescaped-entities": "off",
"react/prop-types": "off",
},
};
2 changes: 1 addition & 1 deletion apps/storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, "package.json")));
}
const config: StorybookConfig = {
stories: ["../../../packages/ui/**/*.stories.@(ts|tsx)"],
stories: ["../src/**/*.stories.{ts,tsx}"],
addons: [
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
Expand Down
24 changes: 17 additions & 7 deletions apps/storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "storybook",
"name": "@/storybook",
"version": "0.0.0",
"private": true,
"scripts": {
Expand All @@ -8,11 +8,15 @@
"dev": "storybook dev -p 6006",
"format": "prettier . --write",
"format:check": "prettier . --check",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"flowbite-react": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1"
"react-dom": "18.3.1",
"react-icons": "5.2.1"
},
"devDependencies": {
"@storybook/addon-essentials": "8.1.10",
Expand All @@ -25,12 +29,18 @@
"@storybook/test": "8.1.10",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@vitejs/plugin-react": "4.3.1",
"@typescript-eslint/eslint-plugin": "8.19.1",
"@typescript-eslint/parser": "8.19.1",
"@vitejs/plugin-react": "4.3.4",
"autoprefixer": "10.4.20",
"postcss": "8.4.41",
"eslint-plugin-react": "7.37.3",
"eslint-plugin-react-refresh": "0.4.16",
"eslint-plugin-storybook": "0.11.1",
"eslint-plugin-vitest": "0.5.4",
"postcss": "8.4.49",
"storybook": "8.1.10",
"tailwindcss": "3.4.7",
"typescript": "5.5.4",
"vite": "5.3.5"
"tailwindcss": "3.4.17",
"typescript": "5.6.3",
"vite": "6.0.7"
}
}
1 change: 1 addition & 0 deletions apps/storybook/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @type {import('postcss-load-config').Config} */
module.exports = {
plugins: {
tailwindcss: {},
Expand Down
10 changes: 10 additions & 0 deletions apps/storybook/prettier.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const rootPrettier = require("../../prettier.config.cjs");

/** @type {import('prettier').Config} */
module.exports = {
...rootPrettier,
plugins: [...rootPrettier.plugins, "prettier-plugin-tailwindcss"],
// tailwindcss
tailwindAttributes: ["theme"],
tailwindFunctions: ["twMerge", "createTheme"],
};
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { Meta, StoryFn } from "@storybook/react";
import type { ComponentProps, FC } from "react";
import { Accordion, AccordionContent, AccordionPanel, AccordionTitle, type AccordionProps } from "flowbite-react";
import { HiChevronDown, HiOutlineArrowCircleDown } from "react-icons/hi";
import type { AccordionProps } from "./Accordion";
import { Accordion } from "./Accordion";

export default {
title: "Components/Accordion",
Expand All @@ -13,13 +11,11 @@ export default {
},
} as Meta;

const icon: FC<ComponentProps<"svg">> = HiChevronDown;

const Template: StoryFn<AccordionProps> = (args) => (
<Accordion arrowIcon={icon} {...args}>
<Accordion.Panel>
<Accordion.Title>What is Flowbite?</Accordion.Title>
<Accordion.Content>
<Accordion arrowIcon={HiChevronDown} {...args}>
<AccordionPanel>
<AccordionTitle>What is Flowbite?</AccordionTitle>
<AccordionContent>
<p className="mb-2 text-gray-500 dark:text-gray-400">
Flowbite is an open-source library of interactive components built on top of Tailwind CSS including buttons,
dropdowns, modals, navbars, and more.
Expand All @@ -34,11 +30,11 @@ const Template: StoryFn<AccordionProps> = (args) => (
</a>
&nbsp;and start developing websites even faster with components on top of Tailwind CSS.
</p>
</Accordion.Content>
</Accordion.Panel>
<Accordion.Panel>
<Accordion.Title>Is there a Figma file available?</Accordion.Title>
<Accordion.Content>
</AccordionContent>
</AccordionPanel>
<AccordionPanel>
<AccordionTitle>Is there a Figma file available?</AccordionTitle>
<AccordionContent>
<p className="mb-2 text-gray-500 dark:text-gray-400">
Flowbite is first conceptualized and designed using the Figma software so everything you see in the library
has a design equivalent in our Figma file.
Expand All @@ -50,11 +46,11 @@ const Template: StoryFn<AccordionProps> = (args) => (
</a>
&nbsp;based on the utility classes from Tailwind CSS and components from Flowbite.
</p>
</Accordion.Content>
</Accordion.Panel>
<Accordion.Panel>
<Accordion.Title>What are the differences between Flowbite and Tailwind UI?</Accordion.Title>
<Accordion.Content>
</AccordionContent>
</AccordionPanel>
<AccordionPanel>
<AccordionTitle>What are the differences between Flowbite and Tailwind UI?</AccordionTitle>
<AccordionContent>
<p className="mb-2 text-gray-500 dark:text-gray-400">
The main difference is that the core components from Flowbite are open source under the MIT license, whereas
Tailwind UI is a paid product. Another difference is that Flowbite relies on smaller and standalone
Expand All @@ -81,8 +77,8 @@ const Template: StoryFn<AccordionProps> = (args) => (
</a>
</li>
</ul>
</Accordion.Content>
</Accordion.Panel>
</AccordionContent>
</AccordionPanel>
</Accordion>
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { Meta, StoryFn } from "@storybook/react";
import type { AlertProps } from "flowbite-react";
import { Alert, theme } from "flowbite-react";
import { HiEye, HiInformationCircle } from "react-icons/hi";
import { theme } from "../../theme";
import type { AlertProps } from "./Alert";
import { Alert } from "./Alert";

export default {
title: "Components/Alert",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta, StoryFn } from "@storybook/react";
import type { AvatarProps } from "./Avatar";
import { Avatar } from "./Avatar";
import type { AvatarProps } from "flowbite-react";
import { Avatar } from "flowbite-react";

export default {
title: "Components/Avatar",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type { Meta, StoryFn } from "@storybook/react";
import { Avatar } from "./Avatar";
import type { AvatarGroupProps } from "./AvatarGroup";
import type { AvatarGroupProps } from "flowbite-react";
import { Avatar, AvatarGroup, AvatarGroupCounter } from "flowbite-react";

export default {
title: "Components/Avatar",
component: Avatar.Group,
component: AvatarGroup,
} as Meta;

const Template: StoryFn<AvatarGroupProps> = (args) => (
<Avatar.Group {...args}>
<AvatarGroup {...args}>
<Avatar img="https://flowbite.com/docs/images/people/profile-picture-1.jpg" rounded stacked />
<Avatar img="https://flowbite.com/docs/images/people/profile-picture-2.jpg" rounded stacked />
<Avatar img="https://flowbite.com/docs/images/people/profile-picture-3.jpg" rounded stacked />
<Avatar img="https://flowbite.com/docs/images/people/profile-picture-4.jpg" rounded stacked />
<Avatar.Counter total={99} href="#" />
</Avatar.Group>
<AvatarGroupCounter total={99} href="#" />
</AvatarGroup>
);

export const DefaultAvatarGroup = Template.bind({});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { Meta, StoryFn } from "@storybook/react";
import { Badge, theme } from "flowbite-react";
import type { BadgeProps } from "flowbite-react";
import { HiCheck } from "react-icons/hi";
import { theme } from "../../theme";
import type { BadgeProps } from "./Badge";
import { Badge } from "./Badge";

export default {
title: "Components/Badge",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Meta, StoryFn } from "@storybook/react";
import type { BannerComponentProps } from "flowbite-react";
import { Banner, BannerCollapseButton } from "flowbite-react";
import { HiX } from "react-icons/hi";
import { MdAnnouncement } from "react-icons/md";
import type { BannerComponentProps } from "./Banner";
import { Banner } from "./Banner";

export default {
title: "Components/Banner",
Expand Down Expand Up @@ -30,9 +30,9 @@ DefaultBanner.args = {
</span>
</p>
</div>
<Banner.CollapseButton color="gray" className="border-0 bg-transparent px-0">
<BannerCollapseButton color="gray" className="border-0 bg-transparent px-0">
<HiX className="size-4" />
</Banner.CollapseButton>
</BannerCollapseButton>
</div>
),
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta, StoryFn } from "@storybook/react";
import type { BlockquoteProps } from "./Blockquote";
import { Blockquote } from "./Blockquote";
import type { BlockquoteProps } from "flowbite-react";
import { Blockquote } from "flowbite-react";

export default {
title: "Components/Blockquote",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type { Meta, StoryFn } from "@storybook/react";
import type { BreadcrumbProps } from "flowbite-react";
import { Breadcrumb, BreadcrumbItem } from "flowbite-react";
import { HiHome } from "react-icons/hi";
import type { BreadcrumbComponentProps } from "./Breadcrumb";
import { Breadcrumb } from "./Breadcrumb";

export default {
title: "Components/Breadcrumb",
component: Breadcrumb,
} as Meta;

const Template: StoryFn<BreadcrumbComponentProps> = (args) => (
const Template: StoryFn<BreadcrumbProps> = (args) => (
<Breadcrumb {...args}>
<Breadcrumb.Item href="#" icon={HiHome}>
<BreadcrumbItem href="#" icon={HiHome}>
Home
</Breadcrumb.Item>
<Breadcrumb.Item href="#">Projects</Breadcrumb.Item>
<Breadcrumb.Item>Flowbite React</Breadcrumb.Item>
</BreadcrumbItem>
<BreadcrumbItem href="#">Projects</BreadcrumbItem>
<BreadcrumbItem>Flowbite React</BreadcrumbItem>
</Breadcrumb>
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Meta, StoryFn } from "@storybook/react";
import { theme } from "../../theme";
import type { ButtonProps } from "./Button";
import { Button } from "./Button";
import { Button, theme } from "flowbite-react";
import type { ButtonProps } from "flowbite-react";

export default {
title: "Components/Button",
Expand Down
Loading
Loading