fix(ui-toolkit): fix tooltip font-size and padding

fixes #971
This commit is contained in:
Sérgio Ramos 2018-01-26 13:48:02 +00:00 committed by Sérgio Ramos
parent b8b64bfa17
commit 955b5e12e2
5 changed files with 29 additions and 36 deletions

View File

@ -1,11 +1,10 @@
import React from 'react';
import styled, { ThemeProvider } from 'styled-components';
import { Grid, Row, Col } from '../grid';
import remcalc from 'remcalc';
import theme from '../theme';
import is from 'styled-is';
import Header, { HeaderBrand } from '../header';
import { Triton } from '../icons';
import { Grid, Row, Col } from '../grid';
import theme from '../theme';
const Main = styled(Row)`
padding-top: ${remcalc(40)};
@ -49,14 +48,6 @@ const StyleGuideRenderer = ({
hasSidebar
}) => (
<ThemeProvider theme={fullTheme}>
<div>
<Sticky>
<Header fluid>
<HeaderBrand beta center>
<Triton light />
</HeaderBrand>
</Header>
</Sticky>
<Grid>
<Main>
{hasSidebar && (
@ -69,7 +60,6 @@ const StyleGuideRenderer = ({
</Col>
</Main>
</Grid>
</div>
</ThemeProvider>
);

View File

@ -1,14 +1,15 @@
```jsx
const React = require('react');
const { default: Tooltip, Container, Target } = require('./');
const { Row, Col } = require('react-styled-flexboxgrid');
const { default: Tooltip, Container, Target } = require('./');
const { P } = require('../text');
<Row center="xs" between="xs" style={{ marginTop: 60 }}>
<Col xs={2}>
<Container>
<Target>Hello</Target>
<Tooltip placement="top">
<code>top</code>
<P white>top</P>
</Tooltip>
</Container>
</Col>
@ -16,7 +17,7 @@ const { Row, Col } = require('react-styled-flexboxgrid');
<Container>
<Target>Hello</Target>
<Tooltip placement="right">
<code>right</code>
<P white>right</P>
</Tooltip>
</Container>
</Col>
@ -24,7 +25,7 @@ const { Row, Col } = require('react-styled-flexboxgrid');
<Container>
<Target>Hello</Target>
<Tooltip placement="bottom">
<code>bottom</code>
<P white>bottom</P>
</Tooltip>
</Container>
</Col>
@ -32,7 +33,7 @@ const { Row, Col } = require('react-styled-flexboxgrid');
<Container>
<Target>Hello</Target>
<Tooltip placement="left">
<code>left</code>
<P white>left</P>
</Tooltip>
</Container>
</Col>
@ -43,15 +44,16 @@ const { Row, Col } = require('react-styled-flexboxgrid');
```jsx
const React = require('react');
const { default: Tooltip, Container, Target } = require('./');
const { Row, Col } = require('react-styled-flexboxgrid');
const { default: Tooltip, Container, Target } = require('./');
const { P } = require('../text');
<Row center="xs" between="xs">
<Col xs={3}>
<Container hoverable>
<Target>Hover here</Target>
<Tooltip placement="top">
<code>top</code>
<P white>top</P>
</Tooltip>
</Container>
</Col>
@ -62,15 +64,16 @@ const { Row, Col } = require('react-styled-flexboxgrid');
```jsx
const React = require('react');
const { default: Tooltip, Container, Target } = require('./');
const { Row, Col } = require('react-styled-flexboxgrid');
const { default: Tooltip, Container, Target } = require('./');
const { P } = require('../text');
<Row center="xs" between="xs">
<Col xs={2}>
<Container clickable>
<Target>Click here</Target>
<Tooltip placement="top">
<code>top</code>
<P white>top</P>
</Tooltip>
</Container>
</Col>

View File

@ -11,7 +11,7 @@ Array [
Hello
</div>,
.c0 {
padding: 0.8125rem 1.125rem;
padding: 0.75rem 1.125rem;
font-weight: normal;
background: rgba(73,73,73,1);
color: rgb(255,255,255);

View File

@ -11,8 +11,9 @@ import style from './style';
const arrowClassName = rndId();
const Popper = styled(BasePopper)`
padding: ${remcalc(13)} ${remcalc(18)};
padding: ${remcalc(12)} ${remcalc(18)};
font-weight: normal;
${style({
background: 'text',
color: 'white',

View File

@ -65,7 +65,6 @@ module.exports = {
name: 'Compound Components',
components: () => [
'src/table/index.js',
'src/header/index.js',
'src/message/index.js',
'src/section-list/index.js',
'src/breadcrumb/index.js'