Skip to content

Commit

Permalink
styled-components syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
henck committed Dec 30, 2023
1 parent acba7a8 commit 3afdcaa
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/controls/CircularProgress/CircularProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const CircularProgressStyled = styled(CircularProgressBase).attrs(p => ({
/**
* Numeric value to show in center of control.
*/
const Value = styled('div')`
const Value = styled.div`
position: absolute;
font-size: 180%;
font-weight: 500;
Expand Down
2 changes: 1 addition & 1 deletion src/controls/DataTable/Head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface IHeadProps {
// HeaderInner is used to get rid of the scrollbar in
// the Head. It is replaced with whitespace.
// https://stackoverflow.com/a/49278385/1266190
const HeadInner = styled('div')`
const HeadInner = styled.div`
display: flex;
margin-right: -999px;
padding-right: 999px;
Expand Down
8 changes: 4 additions & 4 deletions src/controls/DataTable/Styles.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import styled from '../../styles/Theme';

const Body = styled('div')`
const Body = styled.div`
flex: 1;
overflow-y: scroll;
`;

const Table = styled('div')`
const Table = styled.div`
position: relative;
flex: 1;
`

const TableInner = styled('div')`
const TableInner = styled.div`
display: flex;
flex-direction: column;
position: absolute;
Expand All @@ -20,4 +20,4 @@ const TableInner = styled('div')`
bottom: 0;
`

export { Body, Table, TableInner };
export { Body, Table, TableInner }
6 changes: 3 additions & 3 deletions src/controls/Dropdown/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ const MAX_CHILDREN_VISIBLE = 6;
* height as other list items. This is important for opening/closing
* the list to the correct height.
*/
const SearchBox = styled('div')`
const SearchBox = styled.div`
`

const BodyInner = styled('div')`
const BodyInner = styled.div`
`

const Body = styled(BodyBase).attrs(p => ({
Expand Down Expand Up @@ -140,4 +140,4 @@ const Body = styled(BodyBase).attrs(p => ({
}
`;

export { Body };
export { Body }
12 changes: 6 additions & 6 deletions src/controls/Input/Time/Selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,14 @@ class SelectorBase extends React.Component<ISelectorProps, ISelectorState> {
}
}

const Body = styled('div')`
const Body = styled.div`
position: relative;
padding: 14px;
text-align: center;
`;

// Footer contains Select and Cancel buttons:
const Footer = styled('div')`
const Footer = styled.div`
padding: 10px;
text-align: right;
border-top: solid 1px ${p => p.theme.normalColor};
Expand All @@ -236,7 +236,7 @@ const Footer = styled('div')`
`

// ControlBar aligns inputs and AM/PM labels in a row:
const ControlBar = styled('div')`
const ControlBar = styled.div`
display: inline-flex;
border: solid 1px ${p => p.theme.normalColor};
border-radius: ${p => p.theme.radius}px;
Expand All @@ -248,12 +248,12 @@ const ControlBar = styled('div')`

// InputBar aligns inputs in a row. These are in a div of their
// own so that we can do last-child on them.
const InputBar = styled('div')`
const InputBar = styled.div`
display: inline-flex;
`

// Wraps an input, adding ":" after it.
const InputHolder = styled('div')`
const InputHolder = styled.div`
position: relative;
width: 59px;
&:not(:last-child):after {
Expand Down Expand Up @@ -311,4 +311,4 @@ const Selector = styled(SelectorBase)`
}
`

export { Selector };
export { Selector }
2 changes: 1 addition & 1 deletion src/controls/Pane/Pane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class PaneBase extends React.Component<IPaneProps> {
}
}

const Iconholder = styled('div')`
const Iconholder = styled.div`
position: absolute;
right: 10px;
top: 10px;
Expand Down
2 changes: 1 addition & 1 deletion src/controls/Panel/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import styled from '../../styles/Theme';

const Footer = styled('div')`
const Footer = styled.div`
position: relative;
padding: 14px;
background: #f9f9f9;
Expand Down
8 changes: 4 additions & 4 deletions src/modules/DmsInput/DmsInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class DmsInputBase extends React.Component<IProps> {
}
}

const DegreesHolder = styled('div')`
const DegreesHolder = styled.div`
display: inline-block;
position: relative;
width: 63px;
Expand All @@ -151,7 +151,7 @@ const DegreesHolder = styled('div')`
}
`

const MinutesHolder = styled('div')`
const MinutesHolder = styled.div`
display: inline-block;
position: relative;
width: 46px;
Expand All @@ -164,7 +164,7 @@ const MinutesHolder = styled('div')`
}
`

const SecondsHolder = styled('div')`
const SecondsHolder = styled.div`
display: inline-block;
position: relative;
width: 80px;
Expand All @@ -177,7 +177,7 @@ const SecondsHolder = styled('div')`
}
`

const FloatHolder = styled('div')`
const FloatHolder = styled.div`
display: inline-block;
width: 135px;
`
Expand Down
2 changes: 1 addition & 1 deletion src/modules/MarkdownTextarea/MarkdownTextarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const Scrollable = styled(ScrollableBase)`
overflow-x: none;
`

const Options = styled('div')`
const Options = styled.div`
font-size: 9px;
a {
color: steelblue;
Expand Down

0 comments on commit 3afdcaa

Please sign in to comment.