Material UI
Tag: Ruby
Tag: Rails
Category: jekyll
Category: update
Category: git
Category: database
Category: PostgreSQL
Category: websocket
Category: ruby
Category: projects
Category: Redis
Category: mysql
Category: Mac
Category: Node
Category: NPM
Category: PM2
Category: nodejs
Category: Meteor
Category: Nginx
Category: gitLab
Category: Rails
- Why Ruby on Rails is better than Python Django?
- How to use Hotwire turbo in Rails 6 with Webpacker?
- Rails 6 Credentials (master.key and credentials.yml.enc)
- Rails Console
- JIRA-Atlassian-Connect-App-Django
- Rails 4 5.0 Session Cookie AuthenticityToken
- Rails Active Storage
- Rails 5 Source code Research
- 微信支付
- Rails零星笔记
Category: Homebrew
Category: CentOS
Category: FreeSwitch
Category: Ruby
- Ruby on Rails 8
- RESTful API
- Ruby on Rails 7
- Study from Ruby official website
- Ruby-Metaprogramming
- Ruby连数据库的问题
- rbenv使用
Category: Vim
Category: javascript
Category: React-Native
Category: Wechat
Category: homeland
Category: JavaScript
Category: Docker
Category: RubyMine
Category: Authorization
Category: RESTful-API
Category: Proxy
Category: Deploy
Category: Devise
Category: Bootstrap
Category: Active_Storage
Category: github
Category: Android
Category: cloud
Category: ssh
Category: python
Category: reactjs
Category: markdown
Category: ShadowSocks
Category: Code
Category: rails
Category: code
Category: Django
Category: Python
Category: DRF
Category: Fish
Category: Yarn
Category: Material-UI
Category: CSS
Category: aws
Category: uwsgi
Category: nginx
Category: docker
Category: React
Category: Enzyme
Category: Jira
Category: Interview
Category: JetBrain
Category: PyCharm
Category: ESLint
Category: Rails6
Category: NVM
Category: ssl
Category: tencent
Category: CI
Category: jenkins
Category: GitHub
Category: Credentials
Category: master.key
Category: Webpacker
Category: Turbo
Category: Hotwire
Category: Bootstrap5
Category: Flutter
Category: Clash
Category: Tor
Category: proxy
Category: Build
Category: SwitchyOmega
Category: Chrome-extension
Category: SQLAlchemy
Category: Algorithm
Category: Rails7
Category: Data
Category: Structure
Category: CPP
Category: Languages
Category: Golang
Category: Typescript
Category: Rails 8
Layout
https://material-ui.com/guides/responsive-ui/
https://material.io/design/layout/responsive-layout-grid.html#columns-gutters-and-margins
https://material-ui.com/customization/breakpoints/
https://material-ui.com/components/hidden/
https://material-ui.com/system/spacing/
<Container>
help to dynamically change the margin right and left to fit the screen size.
<Container>
<Grid container>
<Grid xs={12} md={6} lg={5} item className="landing-grow">
</Grid>
<Grid xs={12} md={6} lg={7} item className="landing-grow-image">
</Grid>
</Grid>
</Container>
Hidden something
<Hidden smDown>
<Box />
</Hidden>
<Grid item xs={false}>
</Grid>
Grid
- When you want to put something on the left, but something on the right, you can use:
<Grid container justify="space-between" spacing={1}>
<Grid item>
</Grid>
<Grid item>
</Grid>
</Grid>
- Look at this code:
<Grid container>
{/* Grid one */}
<Grid container item xs={12} md={8}>
<Grid>1</Grid>
<Grid>2</Grid>
</Grid>
{/* Grid two */}
{/* Here whether has a `container` prop do matter. If no `container` prop, it's children will not align the previous Grid (Grid one). */}
<Grid item xs={12} md={4}>
<Grid>1</Grid>
<Grid>2</Grid>
</Grid>
</Grid>
Test
- Test
withStyles
.
import { createShallow } from '@material-ui/core/test-utils';
describe('<Issues />', () => {
let shallow;
beforeAll(() => {
shallow = createShallow({ dive: true });
});
it('something', async () => {
mockListIssues(issuesRes);
const wrapper = shallow(
<ComponentToTest />,
);
await waitForAsync();
chai.expect(wrapper.find(SomeInnerComponent).prop('issues')).to.have.lengthOf(1);
});
})