# No Longer Maintained
Our humble recommendation is to use material-ui, which now interops with styled-components fairly well.
# [Styled Material Components](https://styled-material-components.com/)
[Styled Components](https://www.styled-components.com) inspired library that implements Material Design for stress free React Application scaffolding.
## Table of Contents
0. [Inspiration and goals](#inpiration-and-goals)
0. [Getting Started](#getting-started)
0. [Contributing](#contributing)
0. [How to use](#how-to-use)
0. [Theme Provider](#theme-provider)
0. [Component Example](#component-example)
0. [Decorator Example](#decorator-example)
## Inspiration and goals
1. [Styled Components](https://www.styled-components.com) is a great way to couple components with styles.
2. [Material Components](https://github.com/material-components/material-components-web) is the best implementation of material design spec (it is google afterall)
3. We want a native react implementation of the above, and Styled Components gives us that power.
4. Sass Mixins can be mostly written as styled component mixins. See src/mixins/ for examples of this.
## Getting Started
* Fork the repo
* Run:
```
yarn install
yarn build
yarn run dev
```
* Open http://localhost:8081 in your browser
## Contributing
* Check out our [Contributing Guide](https://github.com/ConciergeAuctions/styled-material-components/blob/master/CONTRIBUTING.md)
* Please follow the [Code of Conduct](https://github.com/ConciergeAuctions/styled-material-components/blob/master/CODE_OF_CONDUCT.md)
## How to use
All components in this library are either:
1) Already styled components and will work when wrapping with styled()
2) Handle the className prop correctly so that wrapping with styled() will work.
### Theme Provider
Similar to the Styled Components ThemeProvider (its a thin wrapper around it) except that it provides a default theme that matches material design's default theme. You can provide a custom theme here with any option from src/theme/defaultTheme.js overwritten. You can nest ThemeProviers just like with StyledComponents to overwrite portions of the theme for sections of your application
### Global Style Helpers (^0.1.1-beta)
Prior to version 0.1.1-beta we injected global styles behind the scenes. In our use case this lead to us having to override these often. Styled-components v4 created a new createGlobalStyle builder that exports components. So now you can import these global styles manually and add them to your code where and if you want.
1) SMCGlobalStyles (includes the app wide styles that are typical in most material apps)
2) DrawerGlobalStyles (includes some global styles that push content around on the screen when the presence of a drawer is detected)
### Component Example
#### Button
This component is for creating a material design button. It has props that match the documentation from [Material Components](https://github.com/material-components/material-components-web)
Example Implementation:
```js
// Flat button with primary text color
<Button primary>I’m a Button</Button>
// Flat button with accent text color
<Button accent>I’m a Button</Button>
// Raised button with primary background color
<Button raised primary>I’m a Button</Button>
```
### Decorator Example
#### withRipple
This is a decorator (higher order component) to add a javascript ripple effect to any element that can have a className attached to it.
```js
const JSRippleButton = withRipple(Button);
<JSRippleButton raised primary>Test</JSRippleButton>
```
没有合适的资源?快使用搜索试试~ 我知道了~
MaterialDesign的样式化组件实现_JavaScript_Shell_下载.zip
共1116个文件
js:1097个
md:5个
sh:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 17 浏览量
2023-04-21
10:49:50
上传
评论
收藏 731KB ZIP 举报
温馨提示
MaterialDesign的样式化组件实现_JavaScript_Shell_下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
MaterialDesign的样式化组件实现_JavaScript_Shell_下载.zip (1116个子文件)
AUTHORS 762B
.eslintignore 28B
.flowconfig 114B
.gitignore 69B
index.js 55KB
TextField.js 12KB
Table.js 12KB
tables.js 10KB
Column.js 7KB
flex-grid.js 7KB
menus.js 6KB
lists.js 6KB
Tooltip.js 6KB
buttons.js 6KB
generate-icons.js 5KB
assets.js 5KB
text-fields.js 5KB
cards.js 5KB
ScreenSizeContext.js 5KB
SliderTrack.js 4KB
Footer.js 4KB
makeMaterialSliderTheme.js 4KB
Menu.js 4KB
Chip.js 4KB
Checkbox.js 4KB
dialog.js 3KB
Snackbar.js 3KB
Dialog.js 3KB
checkboxes.js 3KB
typography.js 3KB
naturalSort.js 3KB
DropdownMenu.js 3KB
Tabs.js 3KB
sliders.js 3KB
Switch.js 3KB
tooltip.js 3KB
Slider.js 3KB
icons.js 3KB
elevation.js 3KB
Toolbar.js 3KB
drawer.js 3KB
index.js 2KB
Row.js 2KB
SliderThumb.js 2KB
chips.js 2KB
Drawer.js 2KB
index.js 2KB
snackbar.js 2KB
defaultTheme.js 2KB
withRipple.js 2KB
gridlists.js 2KB
Timer3.js 2KB
tabs.js 2KB
Timer10.js 2KB
BottomSheet.js 2KB
index.js 2KB
Button.js 2KB
Fingerprint.js 2KB
index.js 2KB
flex.js 2KB
Portal.js 2KB
Navigation.js 2KB
ThreeDRotation.js 2KB
BlurOn.js 2KB
dangerfile.js 2KB
avatars.js 1KB
Pool.js 1KB
BlurOff.js 1KB
bottomsheets.js 1KB
MenuList.js 1KB
FloatingActionButton.js 1KB
rollup.config.js 1KB
Primary.js 1KB
Tab.js 1KB
StrikethroughS.js 1KB
Thumb.js 1KB
Forward30.js 1KB
Replay30.js 1KB
divider.js 1KB
next.config.js 1022B
Language.js 1022B
BlurCircular.js 1016B
switches.js 988B
ChildCare.js 978B
PermDataSetting.js 976B
transition.js 963B
BlurLinear.js 960B
SettingsApplications.js 954B
Search.js 951B
Copyright.js 933B
FilterTiltShift.js 918B
ExposureZero.js 917B
Avatar.js 912B
ripple.js 911B
_document.js 902B
Settings.js 885B
Healing.js 876B
GTranslate.js 868B
Gesture.js 865B
fixed.js 861B
共 1116 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9153
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 数据库管理工具:dbeaver-ce-23.0.3-stable.x86-64.rpm
- 外部中断0计数数码管显示0-9.zip
- xp系统安装.net框架包括镜像和.net4.0安装包
- c语言连接两个字符串.pdf
- 数据库管理工具:dbeaver-ce-23.0.3-macos-x86-64.dmg
- 数据库管理工具:dbeaver-ce-23.0.3-macos-aarch64.dmg
- Delphi 12 控件之DEV自动安装程序.exe
- 数据库管理工具:dbeaver-ce-23.0.2-x86-64-setup.exe
- Delphi 12 控件之AnySQL-0.0.9.rar
- 俄罗斯引擎Yandex的进入.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功