ISSUE-068 - Now Styled-Components can self-label.
Updated babel-plugin-styled-components to a new version that works. Added extra option to macros settings to not bother showing the file names.
This commit is contained in:
1 parent
9ccaa5b3d6
commit
3b165c42e9
38 files changed
+66
-133
No files matched your search
@@ -1,9 +1,8 @@
|
||||
import styled from "styled-components";
|
||||
import styled from "styled-components/macro";
|
||||
|
||||
export const Title = styled.h4`
|
||||
font-family: ${p => p.theme.fonts.f1Italic};
|
||||
`;
|
||||
Title.displayName = "Title";
|
||||
|
||||
type ButtonProps = {
|
||||
disabled: boolean,
|
||||
@@ -26,16 +25,13 @@ export const Button = styled.button<ButtonProps>`
|
||||
box-shadow: inset 0px 0px 10px 4px rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
`;
|
||||
Button.displayName = "Button";
|
||||
|
||||
export const OpenButton = styled(Button)<ButtonProps>`
|
||||
background-color: ${({ disabled }) => disabled
|
||||
? p => p.theme.colors.disabledGreen : p => p.theme.colors.activeGreen};
|
||||
`;
|
||||
OpenButton.displayName = "OpenButton";
|
||||
|
||||
export const CloseButton = styled(Button)<ButtonProps>`
|
||||
background-color: ${({ disabled }) => disabled
|
||||
? p => p.theme.colors.disabledRed : p => p.theme.colors.activeRed};
|
||||
`;
|
||||
CloseButton.displayName = "CloseButton";
|
||||
Reference in new issue
Block a user