From 955b5e12e26ffbae6aaa77660bfd499a33c1c65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Fri, 26 Jan 2018 13:48:02 +0000 Subject: [PATCH] fix(ui-toolkit): fix tooltip font-size and padding fixes #971 --- .../ui-toolkit/src/styleguide/renderer.js | 38 +++++++------------ packages/ui-toolkit/src/tooltip/Readme.md | 21 +++++----- .../__snapshots__/tooltip.spec.js.snap | 2 +- packages/ui-toolkit/src/tooltip/index.js | 3 +- packages/ui-toolkit/styleguide.config.js | 1 - 5 files changed, 29 insertions(+), 36 deletions(-) diff --git a/packages/ui-toolkit/src/styleguide/renderer.js b/packages/ui-toolkit/src/styleguide/renderer.js index 45ee3bfa..45235f3d 100644 --- a/packages/ui-toolkit/src/styleguide/renderer.js +++ b/packages/ui-toolkit/src/styleguide/renderer.js @@ -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,27 +48,18 @@ const StyleGuideRenderer = ({ hasSidebar }) => ( -
- -
- - - -
-
- -
- {hasSidebar && ( - - {toc} - - )} - - {children} + +
+ {hasSidebar && ( + + {toc} -
-
-
+ )} + + {children} + + +
); diff --git a/packages/ui-toolkit/src/tooltip/Readme.md b/packages/ui-toolkit/src/tooltip/Readme.md index bc1ea717..df59a498 100644 --- a/packages/ui-toolkit/src/tooltip/Readme.md +++ b/packages/ui-toolkit/src/tooltip/Readme.md @@ -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'); Hello - top +

top

@@ -16,7 +17,7 @@ const { Row, Col } = require('react-styled-flexboxgrid'); Hello - right +

right

@@ -24,7 +25,7 @@ const { Row, Col } = require('react-styled-flexboxgrid'); Hello - bottom +

bottom

@@ -32,7 +33,7 @@ const { Row, Col } = require('react-styled-flexboxgrid'); Hello - left +

left

@@ -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'); Hover here - top +

top

@@ -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'); Click here - top +

top

diff --git a/packages/ui-toolkit/src/tooltip/__tests__/__snapshots__/tooltip.spec.js.snap b/packages/ui-toolkit/src/tooltip/__tests__/__snapshots__/tooltip.spec.js.snap index 9c6de616..69158e56 100644 --- a/packages/ui-toolkit/src/tooltip/__tests__/__snapshots__/tooltip.spec.js.snap +++ b/packages/ui-toolkit/src/tooltip/__tests__/__snapshots__/tooltip.spec.js.snap @@ -11,7 +11,7 @@ Array [ Hello , .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); diff --git a/packages/ui-toolkit/src/tooltip/index.js b/packages/ui-toolkit/src/tooltip/index.js index 17870140..17e44e40 100644 --- a/packages/ui-toolkit/src/tooltip/index.js +++ b/packages/ui-toolkit/src/tooltip/index.js @@ -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', diff --git a/packages/ui-toolkit/styleguide.config.js b/packages/ui-toolkit/styleguide.config.js index cc2c0821..d342b22c 100644 --- a/packages/ui-toolkit/styleguide.config.js +++ b/packages/ui-toolkit/styleguide.config.js @@ -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'