Browse Source

Merge pull request #589 from gre/design-AngleUp

integrate new design for StickyBackToTop
master
Meriadec Pillet 7 years ago
committed by GitHub
parent
commit
203c7f35e7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/components/StickyBackToTop.js
  2. 16
      src/icons/AngleUp.js

4
src/components/StickyBackToTop.js

@ -4,7 +4,7 @@ import ReactDOM from 'react-dom'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import Box from 'components/base/Box'
import ArrowUp from 'icons/ArrowUp'
import AngleUp from 'icons/AngleUp'
const Container = styled(Box)`
position: fixed;
@ -85,7 +85,7 @@ class StickyBackToTop extends PureComponent<Props, State> {
if (!el) return null
return ReactDOM.createPortal(
<Container align="center" justify="center" visible={visible} onClick={this.onClick}>
<ArrowUp size={16} />
<AngleUp size={20} />
</Container>,
el,
)

16
src/icons/AngleUp.js

@ -0,0 +1,16 @@
// @flow
import React from 'react'
const path = (
<path
fill="currentColor"
d="M10.345 6.414l6.012 5.734c.19.184.19.48 0 .665l-.804.773a.502.502 0 0 1-.69 0L10 8.957l-4.862 4.629a.502.502 0 0 1-.69 0l-.805-.774a.457.457 0 0 1 0-.664l6.012-5.734c.19-.184.5-.184.69 0z"
/>
)
export default ({ size, ...p }: { size: number }) => (
<svg viewBox="0 0 20 20" height={size} width={size} {...p}>
{path}
</svg>
)
Loading…
Cancel
Save