Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 565 Bytes

File metadata and controls

31 lines (26 loc) · 565 Bytes

Inline StyleSheet Interface

Inline Style Interface is when styles are defined at module level in a "CSS stylesheet-like" object and then applied as inline styles.

This interface can be used in any React project.

Example

const styles = {
  container: {
    border: '1px solid tomato',
  },
  button: {
    background: 'red',
    borderRadius: '5px',
    color: '#fff'
  }
};

class Button extends Component {
  render () {
    return (
      <div style={styles.container}>
        <button style={styles.button}/>
      </div>
    );
  }
}