-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Atlas #4 - Updating "core-data" package to export separate custom CSS…
… and Tailwind CSS
- Loading branch information
dleadbetter
committed
Mar 29, 2024
1 parent
0582a8b
commit 972d1a2
Showing
22 changed files
with
99 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# core-data | ||
|
||
## CSS | ||
Depending on whether your application using Tailwind CSS, we'll configure the CSS in one of two ways: | ||
|
||
### WITHOUT Tailwind CSS | ||
Import both exported `styles.css` and `tailwind.css` into your application. | ||
|
||
```javascript | ||
// index.js | ||
|
||
import '@performant-software/core-data/styles.css'; | ||
import '@performant-software/core-data/tailwind.css'; | ||
``` | ||
|
||
### WITH Tailwind CSS | ||
|
||
Import **ONLY** the `styles.css` import your application. | ||
|
||
```javascript | ||
// index.js | ||
|
||
import '@performant-software/core-data/styles.css'; | ||
``` | ||
|
||
Include the `core-data` Tailwind config as a `present`, and update the `content` section to source classes from the `core-data` package. | ||
|
||
```javascript | ||
// tailwind.config.js | ||
|
||
import coreDataConfig from '@performant-software/core-data/tailwind.config'; | ||
|
||
export default { | ||
presets: [ | ||
coreDataConfig | ||
], | ||
content: [ | ||
'../../node_modules/@performant-software/core-data/**/*.{js,jsx,ts,tsx}' | ||
] | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
export default { | ||
plugins: { | ||
'postcss-import': {}, | ||
tailwindcss: {}, | ||
autoprefixer: {} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// @flow | ||
|
||
import React, { type Node } from 'react'; | ||
import './FacetList.css'; | ||
|
||
type Props = { | ||
label: string, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// @flow | ||
|
||
import React from 'react'; | ||
import './LoadAnimation.css'; | ||
|
||
type Props = { | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
@import './styles/FacetList.css'; | ||
@import './styles/LoadAnimation.css'; | ||
@import './styles/MediaGallery.css'; | ||
@import './styles/PlaceResultsList.css'; | ||
@import './styles/RelatedItemsList.css'; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@import 'tailwindcss/base'; | ||
@import 'tailwindcss/components'; | ||
@import 'tailwindcss/utilities'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// @flow | ||
|
||
import './tailwind.css'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
import coreDataConfig from '@performant-software/core-data/tailwind.config.js'; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import coreDataConfig from '@performant-software/core-data/tailwind.config'; | ||
|
||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
export default { | ||
presets: [ | ||
coreDataConfig | ||
], | ||
content: [ | ||
'./src/index.css', | ||
'./src/**/*.js', | ||
'../../node_modules/@performant-software/core-data/src/**/*.{js,jsx,ts,tsx}' | ||
'./src/**/*.{js,jsx,ts,tsx}', | ||
'../../node_modules/@performant-software/core-data/**/*.{js,jsx,ts,tsx}' | ||
], | ||
theme: { | ||
...coreDataConfig.theme, | ||
extend: { | ||
...coreDataConfig.theme?.extend | ||
}, | ||
extend: {}, | ||
}, | ||
plugins: [ | ||
...coreDataConfig.plugins | ||
] | ||
plugins: [] | ||
}; |