Skip to content

Commit

Permalink
feature/CC 4 avatar (#14)
Browse files Browse the repository at this point in the history
* Avatar

* Export comments

* Update package, typings.d.ts update
  • Loading branch information
joaltoroc authored Jan 3, 2024
1 parent f94fecc commit 314777a
Show file tree
Hide file tree
Showing 28 changed files with 576 additions and 266 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"cSpell.words": [
"autodocs",
"creativecode",
"cssnano",
"daisyui",
"firefox",
"tailwindcss",
Expand Down
41 changes: 37 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ yarn add @creativecodeco/ui
### Dependencies

```bash
npm install --save-dev tailwindcss postcss postcss-import autoprefixer usehooks-ts
npm install --save-dev tailwindcss postcss postcss-import autoprefixer usehooks-ts cssnano

or

yarn add -D tailwindcss postcss postcss-import autoprefixer usehooks-ts
yarn add -D tailwindcss postcss postcss-import autoprefixer usehooks-ts cssnano
```

### Setting Tailwind
Expand All @@ -46,13 +46,45 @@ const themeConfig = {
...creativeCodeTheme.content,
'./src/**/*.{js,jsx,ts,tsx}',
'./app/**/*.{js,jsx,ts,tsx}',
'./node_modules/@creativecodeco/ui/lib/**/*.{js,jsx,ts,tsx}',
],
};

export default themeConfig;
```

#### Custom theme

```js
/** @type {import('tailwindcss').Config} */
import { creativeCodeTheme } from '@creativecodeco/ui';

const themeConfig = {
...creativeCodeTheme,
content: [
...creativeCodeTheme.content,
'./src/**/*.{js,jsx,ts,tsx}',
'./app/**/*.{js,jsx,ts,tsx}',
],
daisyui: {
...creativeCodeTheme.daisyui,
themes: [
{
customTheme: {
...require('daisyui/src/theming/themes')['light'],
primary: '#08448c',
secondary: '#427AA1',
neutral: '#EBF2FA',
accent: '#679436',
other: '#A5BE00',
},
},
],
},
};

export default themeConfig;
```

### Setting Postcss

Create file `postcss.config.js` and add
Expand All @@ -64,6 +96,7 @@ module.exports = {
'tailwindcss/nesting': {},
tailwindcss: {},
autoprefixer: {},
...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {}),
},
};
```
Expand All @@ -75,7 +108,7 @@ Add on layout `layout.tsx`
```tsx
import { CreativeCodeUIProvider } from '@creativecodeco/ui';

import '@creativecodeco/ui/lib/theme/main.css';
import '@creativecodeco/ui/lib/theme/css/main.css';

export default function RootLayout({ children }) {
return (
Expand Down
Loading

0 comments on commit 314777a

Please sign in to comment.