Skip to content

Instantly share code, notes, and snippets.

@ben-kirby
Created August 13, 2019 21:14
Show Gist options
  • Save ben-kirby/338b5f5c99114a8354b15151d7995bf0 to your computer and use it in GitHub Desktop.
Save ben-kirby/338b5f5c99114a8354b15151d7995bf0 to your computer and use it in GitHub Desktop.
Using Semantic UI in tandem with Styled Components
import React, { Component } from 'react';
import { Button } from 'semantic-ui-react';
import { StyledButton } from './styledComponents';
export default class App extends Component {
render(){
return(
<div>
<Button>This is a normal Semantic button</Button>
<StyledButton>This is a Semantic button that has been styled with Styled Components</StyledButton>
</div>
);
}
}
import React from 'react';
import styled from 'styled-components';
import { Button } from 'semantic-ui-react';
export const StyledButton = styled(Button)({
color: 'red!important'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment