🔧 config: using sass

:%s
This commit is contained in:
lytrankieio123
2021-08-20 11:30:21 +07:00
parent d8ec1fa717
commit 1fa9d08a79
12 changed files with 68 additions and 32 deletions

View File

@@ -1,5 +0,0 @@
/* style demo here */
.header {
color: green;
}

View File

@@ -0,0 +1,12 @@
.header {
.button {
@apply font-bold py-2 px-4 rounded;
}
.btnBlue {
@apply bg-blue hover:bg-cyan text-white font-bold py-2 px-4;
border-radius: theme("borderRadius.custom");
}
.link {
color: theme("colors.pink");
}
}

View File

@@ -1,14 +1,22 @@
import { FC, useRef, useEffect } from 'react'
import s from './Header.module.css'
import { FC } from 'react'
import s from './Header.module.scss'
interface Props {
className?: string
children?: any
}
const Header: FC<Props> = ({ }) => {
const Header: FC<Props> = ({ }:Props ) => {
return (
<div className={s.header}>This is Header</div>
<div className={s.header}>
This is Header
<button className={s.btnBlue}>
Button
</button>
<div className={s.link}>
Test link style
</div>
</div>
)
}

1
src/styles/_utility.scss Normal file
View File

@@ -0,0 +1 @@
// utility css here

View File

@@ -1,12 +0,0 @@
/**
* Chrome has a bug with transitions on load since 2012!
*
* To prevent a "pop" of content, you have to disable all transitions until
* the page is done loading.
*
* https://lab.laukstein.com/bug/input
* https://twitter.com/timer150/status/1345217126680899584
*/
body.loading * {
transition: none !important;
}

View File

@@ -1,6 +0,0 @@
@tailwind base;
@import './base.css';
@tailwind components;
@tailwind utilities;

5
src/styles/main.scss Normal file
View File

@@ -0,0 +1,5 @@
@import "~tailwindcss/base";
@import './base';
@import "~tailwindcss/components";
@import "~tailwindcss/utilities";
@import 'utility'