Skip to content

Commit

Permalink
feat: export props
Browse files Browse the repository at this point in the history
  • Loading branch information
cazala committed Jul 16, 2018
1 parent 7a8e531 commit 37f6a37
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/components/Address/Address.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as React from 'react'
import './Address.css'

type Props = {
export type AddressProps = {
value: string
strong?: boolean
shorten?: boolean
tooltip?: boolean
className?: string
}

export class Address extends React.Component<Props> {
export class Address extends React.Component<AddressProps> {
static defaultProps = {
className: '',
strong: false,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Blockie/Blockie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import * as blockies from 'ethereum-blockies/blockies'
import './Blockie.css'

type Props = {
export type BlockieProps = {
seed: string
color?: string
spotcolor?: string
Expand All @@ -13,7 +13,7 @@ type Props = {
children?: React.ReactNode
}

export class Blockie extends React.PureComponent<Props> {
export class Blockie extends React.PureComponent<BlockieProps> {
private shouldRefresh: boolean = false
public canvas: HTMLCanvasElement = null
static defaultProps = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Center/Center.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from 'react'
import './Center.css'

type Props = {
export type CenterProps = {
screen?: boolean
}

export class Center extends React.PureComponent<Props> {
export class Center extends React.PureComponent<CenterProps> {
render() {
const { screen, children } = this.props
const classes = `dcl center ${screen ? 'screen' : ''}`.trim()
Expand Down
4 changes: 2 additions & 2 deletions src/components/Mana/Mana.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import './Mana.css'
import { Header } from 'semantic-ui-react'

type Props = {
export type ManaProps = {
size?: 'tiny' | 'small' | 'medium' | 'large' | 'huge'
black?: boolean
text?: boolean
Expand All @@ -11,7 +11,7 @@ type Props = {
children?: React.ReactChild
}

export class Mana extends React.Component<Props> {
export class Mana extends React.Component<ManaProps> {
static defaultProps = {
className: ''
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Header, Icon, Menu, Responsive, Sidebar } from 'semantic-ui-react'
import { Blockie, Logo, Mana } from '../..'
import './Navbar.css'

type Props = {
export type NavbarProps = {
mana?: number
address?: string
logo?: React.ReactNode
Expand All @@ -20,11 +20,11 @@ type Props = {
onBack?: () => void
}

type State = {
export type NavbarState = {
toggle: boolean
}

export class Navbar extends React.PureComponent<Props, State> {
export class Navbar extends React.PureComponent<NavbarProps, NavbarState> {
static defaultProps = {
mana: null,
address: null,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Stats/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import * as React from 'react'
import './Stats.css'
import { Header } from 'semantic-ui-react'

type Props = {
export type StatsProps = {
title: string
className?: string
}

export class Stats extends React.Component<Props> {
export class Stats extends React.Component<StatsProps> {
static defaultProps = {
className: ''
}
Expand Down
14 changes: 7 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import './components/Radio/Radio.css'
import './components/Table/Table.css'

// Decentraland components
export { Address } from './components/Address/Address'
export { Blockie } from './components/Blockie/Blockie'
export { Center } from './components/Center/Center'
export { Logo } from './components/Logo/Logo'
export { Mana } from './components/Mana/Mana'
export { Navbar } from './components/Navbar/Navbar'
export { Stats } from './components/Stats/Stats'
export * from './components/Address/Address'
export * from './components/Blockie/Blockie'
export * from './components/Center/Center'
export * from './components/Logo/Logo'
export * from './components/Mana/Mana'
export * from './components/Navbar/Navbar'
export * from './components/Stats/Stats'

// Semantic components
export * from 'semantic-ui-react'

0 comments on commit 37f6a37

Please sign in to comment.