Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docz-theme-default): text alignment in table thead #403

Merged
merged 2 commits into from
Oct 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/docz-theme-default/src/components/ui/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const TableStyled = styled('table')`
}

& thead th {
text-align: left;
font-weight: 400;
padding: 20px 20px;

Expand Down
14 changes: 12 additions & 2 deletions packages/docz/src/components/PropsTable.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import * as React from 'react'
import { Fragment, SFC, ComponentType } from 'react'
import { CSSProperties, Fragment, SFC, ComponentType } from 'react'
import { withMDXComponents } from '@mdx-js/tag/dist/mdx-provider'
import capitalize from 'capitalize'

import { humanize } from '../utils/humanize-prop'

export interface StylesMap {
[s: string]: CSSProperties
}

const styles: StylesMap = {
thead: {
textAlign: 'left'
},
}

export interface EnumValue {
value: string
computed: boolean
Expand Down Expand Up @@ -116,7 +126,7 @@ const BasePropsTable: SFC<PropsTable> = ({ of: component, components }) => {
return (
<Fragment>
<Table className="PropsTable">
<Thead>
<Thead style={styles.thead}>
<Tr>
<Th className="PropsTable--property">Property</Th>
<Th className="PropsTable--type">Type</Th>
Expand Down