Skip to content

Commit

Permalink
fix(tw preset): fix tailwind preset paths
Browse files Browse the repository at this point in the history
  • Loading branch information
spudly committed Jul 15, 2022
1 parent 644d109 commit 1a6a91f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/_internal/utils/dock.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pushpop from '@spudly/pushpop';
import * as pushpop from '@spudly/pushpop';
import _clsx from 'clsx';
import {defaultImport} from 'default-import';

const {isNotNil, unique} = pushpop;
const {isNotNil, unique} = defaultImport(pushpop);

const clsx = defaultImport(_clsx);

Expand Down
4 changes: 2 additions & 2 deletions src/components/buttons/DropdownButton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ export const DropdownButton: FC = () => (
<div className="flex flex-wrap gap-2">
<DropdownButtonComponent
label="Dropdown Button (bottom-left)"
placement="left-start"
placement="left-end"
>
{menu}
</DropdownButtonComponent>
<DropdownButtonComponent
label="Dropdown Button (right-end)"
label="Dropdown Button (bottom-right)"
placement="right-end"
>
{menu}
Expand Down
2 changes: 1 addition & 1 deletion src/components/buttons/DropdownButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const DropdownButton: FC<Props> = ({
<Dropdown
isOpen={isOpen}
close={close}
renderTrigger={ref => (
renderTrigger={({ref}) => (
<Button ref={ref as any} {...buttonProps} onClick={toggle}>
{label} <CollapsibleIcon isOpen={isOpen} />
</Button>
Expand Down
6 changes: 5 additions & 1 deletion tailwind-preset.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ const colors = require('tailwindcss/colors.js');
*/
module.exports = ({content = []} = {}) => ({
mode: 'jit',
content: ['./src/**/*.{js,cjs,mjs,jsx,ts,tsx,mts,cts}', ...content],
content: [
// eslint-disable-next-line node/no-path-concat -- glob
`${__dirname}/dist/**/*.{js,cjs,mjs,jsx,ts,tsx,mts,cts}`,
...content,
],
darkMode: 'class',
theme: {
extend: {
Expand Down
5 changes: 4 additions & 1 deletion tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ const uiPreset = require('./tailwind-preset.cjs');
module.exports = {
presets: [
uiPreset({
content: ['./.ladle/**/*.{js,cjs,mjs,jsx,ts,tsx,mts,cts}'],
content: [
'./src/**/*.{js,cjs,mjs,jsx,ts,tsx,mts,cts}',
'./.ladle/**/*.{js,cjs,mjs,jsx,ts,tsx,mts,cts}',
],
}),
],
};

0 comments on commit 1a6a91f

Please sign in to comment.