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

Remove global icon imports #437

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6951439
Swapped @rimble/icons in for RMDI
Dec 2, 2019
19437ff
Updated version of rimble-icons used in place of rmdi.
Dec 11, 2019
147ced7
Updated dependency versions. Added new icons demo app.
Dec 17, 2019
873e78f
Add inline-react-svg babel plugin. Add sideEffects property to packag…
Dec 23, 2019
77172d6
Update package build and start scripts to run both rollup (for UMD) a…
Dec 23, 2019
37c0fac
Add babel as dev dependency for build server.
Dec 23, 2019
17cb4fd
Updated dependent package versions for styled-system and styled-compo…
Dec 26, 2019
af17837
Setting icon color on button icons.
Dec 26, 2019
884c89e
Pull latest changes to @rimble/icons. Revert Icons color prop used in…
Dec 27, 2019
dedb05d
Pull @rimble/icons from master branch.
Dec 27, 2019
766ecd6
Updated snapshots.
Dec 27, 2019
f3a9f8d
Merge branch 'ml-refactor-icons-dependency' into ml-new-icons
Dec 27, 2019
b67fcb1
Update snapshots again.
Dec 27, 2019
d3d9301
Add in Rimble icons lib via yarn instead of npm.
Dec 27, 2019
50903e0
Update package.json to pull from master branch of @rimble/icons.
Dec 27, 2019
040f374
Merge branch 'ml-treeshake-take2' into ml-remove-icon
Dec 27, 2019
7b7d63b
Combine updated icons and treeshaking branches.
Dec 30, 2019
bba01c8
Refactor components to not use Icon component or generic global icon …
Dec 30, 2019
106773f
Refactor ToastMessage to accept children elements to allow other icon…
Dec 30, 2019
5cd9323
Added example icons.
Dec 30, 2019
3433211
Add Button with icon examples to demo app.
Dec 30, 2019
3b89b7b
Fix failing ToastMessage tests.
Dec 30, 2019
7b320d3
Remove Icon references from storybook.
Dec 30, 2019
8c00236
Merge branch 'master' into ml-remove-icon
Feb 25, 2020
4c6ffd8
Fix import of icons.
Feb 25, 2020
1fb7db8
Merge branch 'development' into ml-treeshake-take2
Mar 26, 2020
7941f74
Remove package-lock
Mar 26, 2020
ae4c958
Merge pull request #434 from ConsenSys/ml-treeshake-take2
gesquinca Mar 26, 2020
109f114
Version bump
Mar 26, 2020
db5f94f
Merge branch 'master' into development
Mar 26, 2020
e0b6d98
Merge branch 'development' into ml-remove-icon
Apr 28, 2020
46e9798
Bump version for demo app CRA deps
Apr 28, 2020
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
7 changes: 4 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"presets": [
["@babel/preset-react", {"modules": false}],
["@babel/preset-env", {"modules": false}]
["@babel/preset-react", { "modules": false }],
["@babel/preset-env", { "modules": false }]
],
"plugins": [
["babel-plugin-styled-components", { "pure": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
["@babel/plugin-proposal-class-properties", { "loose": true }],
"inline-react-svg"
]
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ class Example extends Component {

## Change log

### 0.14.0

🚀 New Feature

- Export ES6 modules for tree shaking 🌳

### 0.13.1

🐛 Bug Fix
Expand Down
9 changes: 6 additions & 3 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
"dependencies": {
"react": "link:../node_modules/react",
"react-dom": "link:../node_modules/react-dom",
"react-scripts": "3.1.2",
"rimble-ui": "link:.."
"react-scripts": "3.4.1",
"rimble-ui": "link:..",
"source-map-explorer": "^2.1.2"
},
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
Expand All @@ -28,5 +30,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"devDependencies": {}
}
75 changes: 50 additions & 25 deletions demo/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
Flash,
Flex,
Heading,
Icon,
Image,
Input,
Link,
Expand All @@ -36,8 +35,14 @@ import {
theme,
} from 'rimble-ui'

import { Eth, Btc } from '@rimble/icons'

import {
Accessibility as IconAccessibility,
Info as IconInfo,
Eth as IconEth,
Btc as IconBtc,
Dai as IconDai,
Rdd as IconRdd,
} from '@rimble/icons'
import TestForm from './components/TestForm'
import BaseLineGrid from './components/BaseLineGrid'

Expand Down Expand Up @@ -142,7 +147,22 @@ const testComponents = props => (
quibusdam, assumenda officiis.
</Text>

<Button size={'medium'}>Click me!</Button>
<Box>
<Button size={'medium'}>Click me!</Button>
</Box>
<Box>
<Button size={'medium'} my={2}>
<Flex alignItems={'center'}>
<IconEth mr={2} />
Icon and text button
</Flex>
</Button>
</Box>
<Box>
<Button size={'small'} p={0}>
<IconEth />
</Button>
</Box>
<Link>I'm a Link!</Link>
<EthAddress address="0x99cb784f0429efd72wu39fn4256n8wud4e01c7d2" />
<EthAddress
Expand All @@ -155,33 +175,38 @@ const testComponents = props => (
<Input placeholder={'placeholder'} />

<Box>
<Text>Icon component from rimble-ui</Text>
<Icon name={'Info'} />
<Icon name={'Eth'} />
<Icon name={'Btc'} />
<Text>Plain icons</Text>
<IconAccessibility />
<IconInfo />
<IconEth />
<IconBtc />
<IconDai />
<IconRdd />
</Box>

<Box>
<Text>
Icon component from rimble-ui using "primary" color from theme
</Text>
<Icon name={'Info'} color="primary" />
<Icon name={'Eth'} color="primary" />
<Icon name={'Btc'} color="primary" />
</Box>
<Box>
<Text>Icon component from rimble-ui, color="green"</Text>
<Icon name={'Info'} color="green" />
<Icon name={'Eth'} color="green" />
<Icon name={'Btc'} color="green" />
<Text>Colored icons</Text>
<IconAccessibility color={'green'} />
<IconInfo color={'green'} />
<IconEth color={'green'} />
<IconBtc color={'green'} />
<IconDai color={'green'} />
<IconRdd color={'green'} />
</Box>

<Box>
<Text>Icons imported as components from @rimble/icons</Text>
<Eth color="primary" />
<Btc color="primary" />
<Eth color="green" />
<Btc color="green" />
<Text>Theme-value color (primary)</Text>
<Text italic fontSize={1}>
Icons do not have a default theme value
</Text>
<IconAccessibility color={'primary'} />
<IconInfo color={'primary'} />
<IconEth color={'primary'} />
<IconBtc color={'primary'} />
<IconDai color={'primary'} />
<IconRdd color={'primary'} />
</Box>

<Tooltip message="Your custom message">
<span>hover me</span>
</Tooltip>
Expand Down
Loading