styled-rules
v0.3.1
Published
Presets style rules, theme based, highly customizable style props
Downloads
2
Maintainers
Readme
styled-rules
Preset style rules, theme based, highly customizable style props
Install
yarn add styled-rules
Basic usage
import React from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
import styledBy from "styled-by";
import { flexbox } from "styled-rules";
const propTypes = {
...flexbox.propTypes
};
const defaultProps = {
...flexbox.defaultProps
};
const Wrapper = props => <div {...props}>Styled Rules!</div>;
Wrapper.propTypes = propTypes;
Wrapper.defaultProps = defaultProps;
export default styled(Wrapper)`
${styledBy(flexbox.rules)};
`;
License
MIT © Bruno Bertolini