Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/team-griffin/css-sides
Generate css properties for sides
https://github.com/team-griffin/css-sides
css sides styles
Last synced: about 1 month ago
JSON representation
Generate css properties for sides
- Host: GitHub
- URL: https://github.com/team-griffin/css-sides
- Owner: team-griffin
- License: mit
- Created: 2017-03-10T11:11:04.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-25T08:12:08.000Z (almost 2 years ago)
- Last Synced: 2024-11-06T11:12:29.045Z (about 2 months ago)
- Topics: css, sides, styles
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@team-griffin/css-sides
- Size: 408 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# css-sides
`npm install @team-griffin/css-sides --save`
`yarn add @team-griffin/css-sides`
A css util to make doing multiple sides at once shorter.
## Usage
```jsx
import cssSides, { Side } from '@team-griffin/css-sides';cssSides('margin', Side.A, 10);
///
{
marginLeft: 10,
marginTop: 10,
marginRight: 10,
marginBottom: 10,
}cssSides('margin', Side.X, 10);
///
{
marginLeft: 10,
marginRight: 10,
}cssSides('margin', Side.Y, 10);
{
marginTop: 10,
marginBottom: 10,
}// Placing into a styles object
const styles = {
...cssSides('margin', Side.A, 10),
};
```