这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
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
1 change: 1 addition & 0 deletions packages/circle-react-elements/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ export * from './components/WalletReceive';
export * from './components/WalletSetDetails';
export * as formats from './lib/format';
export * as utils from './lib/utils';
export * from './styles/tailwind.preset';
Copy link
Contributor

Choose a reason for hiding this comment

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

notice that preset has its own build step and export settings to not mix up the configuration with usage, see packages/circle-react-elements/package.json

4 changes: 1 addition & 3 deletions packages/circle-react-elements/src/styles/tailwind.preset.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tailwindAnimate from 'tailwindcss-animate';

const preset = {
export const tailwindPreset = {
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest to use more package-name related name here as consumer could use multiple presets in their app, so circleElementsPreset would be more accurate

theme: {
extend: {
fontFamily: {
Expand Down Expand Up @@ -61,5 +61,3 @@ const preset = {
},
plugins: [tailwindAnimate],
};

export default preset;
4 changes: 2 additions & 2 deletions packages/circle-react-elements/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Config } from 'tailwindcss';
import elementsPreset from './src/styles/tailwind.preset';
import { tailwindPreset } from './src/styles/tailwind.preset';

export default {
darkMode: ['class'],
content: ['./src/**/*.{ts,tsx}', './.storybook/**/*.{ts,tsx}'],
presets: [elementsPreset],
presets: [tailwindPreset],
theme: {
extend: {},
},
Expand Down
Loading