-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zero][vite][app] Showcase usage and transformation of UI library
imported from node_modules
- Loading branch information
1 parent
cd3ef6f
commit 37d4ceb
Showing
7 changed files
with
53 additions
and
67 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,7 @@ | ||
// eslint-disable-next-line import/prefer-default-export | ||
export const bounceAnim: string; | ||
export const Button: React.ComponentType< | ||
JSX.IntrinsicElements['button'] & { | ||
isRed?: boolean; | ||
} | ||
>; |
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,32 @@ | ||
import { keyframes, styled } from '@mui/zero-runtime'; | ||
|
||
// eslint-disable-next-line import/prefer-default-export | ||
export const bounceAnim = keyframes({ | ||
'from, 20%, 53%, 80%, to': { | ||
transform: 'translate3d(0,0,0)', | ||
}, | ||
'40%, 43%': { | ||
transform: 'translate3d(0, -30px, 0)', | ||
}, | ||
'70%': { | ||
transform: 'translate3d(0, -15px, 0)', | ||
}, | ||
'90%': { | ||
transform: 'translate3d(0,-4px,0)', | ||
}, | ||
}); | ||
|
||
export const Button = styled('button', { | ||
name: 'MuiButton', | ||
slot: 'Root', | ||
})( | ||
({ theme }) => ({ | ||
fontFamily: 'sans-serif', | ||
backgroundColor: theme.palette.primary.main, | ||
}), | ||
{ | ||
fontFamily: 'sans-serif', | ||
color: (props) => (props.isRed ? 'primary.main' : 'secondary.main'), | ||
'--css-variable': (props) => (props.isRed ? 'palette.primary.main' : 'palette.secondary.main'), | ||
}, | ||
); |
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,7 @@ | ||
{ | ||
"name": "local-ui-lib", | ||
"version": "0.0.0", | ||
"dependencies": { | ||
"zero-runtime": "*" | ||
} | ||
} |
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