Restructure components

release
Etienne Lemay 2018-04-26 11:47:30 -04:00
parent d17594315c
commit a8b81f1858
No known key found for this signature in database
GPG Key ID: EE7CF89146BB28E9
13 changed files with 68 additions and 47 deletions

View File

@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import SVGs from '../svgs'
import SVGs from '../../svgs'
export default class Anchors extends React.PureComponent {
constructor(props) {

View File

@ -1,7 +1,11 @@
import React from 'react'
import data from '../data'
import { CategoryPropTypes, CategoryDefaultProps } from '../utils/shared-props'
import NimbleCategory from './category'
import data from '../../data'
import NimbleCategory from './nimble-category'
import {
CategoryPropTypes,
CategoryDefaultProps,
} from '../../utils/shared-props'
export default class Category extends React.Component {
render() {

View File

@ -1,10 +1,14 @@
import React from 'react'
import PropTypes from 'prop-types'
import frequently from '../utils/frequently'
import { getData } from '../utils'
import { CategoryPropTypes, CategoryDefaultProps } from '../utils/shared-props'
import NimbleEmoji from './emoji'
import frequently from '../../utils/frequently'
import { getData } from '../../utils'
import { NimbleEmoji } from '..'
import {
CategoryPropTypes,
CategoryDefaultProps,
} from '../../utils/shared-props'
export default class NimbleCategory extends React.Component {
constructor(props) {

View File

@ -1,7 +1,9 @@
import React from 'react'
import data from '../data'
import { EmojiPropTypes, EmojiDefaultProps } from '../utils/shared-props'
import NimbleEmoji from './emoji'
import data from '../../data'
import NimbleEmoji from './nimble-emoji'
import { EmojiPropTypes, EmojiDefaultProps } from '../../utils/shared-props'
const Emoji = (props) => {
for (let k in Emoji.defaultProps) {

View File

@ -1,8 +1,8 @@
import React from 'react'
import PropTypes from 'prop-types'
import { getData, getSanitizedData, unifiedToNative } from '../utils'
import { EmojiPropTypes, EmojiDefaultProps } from '../utils/shared-props'
import { getData, getSanitizedData, unifiedToNative } from '../../utils'
import { EmojiPropTypes, EmojiDefaultProps } from '../../utils/shared-props'
const SHEET_COLUMNS = 52

View File

@ -1,12 +1,18 @@
export { default as Anchors } from './anchors'
export { default as Category } from './parent-category'
export { default as Emoji } from './parent-emoji'
export { default as Picker } from './parent-picker'
export { default as Preview } from './parent-preview'
export { default as Search } from './parent-search'
export { default as Skins } from './skins'
export { default as NimbleCategory } from './category'
export { default as NimbleEmoji } from './emoji'
export { default as NimblePicker } from './picker'
export { default as NimblePreview } from './preview'
export { default as NimbleSearch } from './search'
export { default as Anchors } from './anchors/anchors'
export { default as Category } from './category/category'
export { default as NimbleCategory } from './category/nimble-category'
export { default as Emoji } from './emoji/emoji'
export { default as NimbleEmoji } from './emoji/nimble-emoji'
export { default as Picker } from './picker/picker'
export { default as NimblePicker } from './picker/nimble-picker'
export { default as Preview } from './preview/preview'
export { default as NimblePreview } from './preview/nimble-preview'
export { default as Search } from './search/search'
export { default as NimbleSearch } from './search/nimble-search'
export { default as Skins } from './skins/skins'

View File

@ -1,14 +1,14 @@
import '../vendor/raf-polyfill'
import '../../vendor/raf-polyfill'
import React from 'react'
import PropTypes from 'prop-types'
import store from '../utils/store'
import frequently from '../utils/frequently'
import { deepMerge, measureScrollbar } from '../utils'
import { PickerPropTypes, PickerDefaultProps } from '../utils/shared-props'
import store from '../../utils/store'
import frequently from '../../utils/frequently'
import { deepMerge, measureScrollbar } from '../../utils'
import { PickerPropTypes, PickerDefaultProps } from '../../utils/shared-props'
import { Anchors, NimbleCategory, NimblePreview, NimbleSearch } from '.'
import { Anchors, NimbleCategory, NimblePreview, NimbleSearch } from '..'
const I18N = {
search: 'Search',

View File

@ -1,9 +1,9 @@
import '../vendor/raf-polyfill'
import React from 'react'
import data from '../data'
import { PickerPropTypes, PickerDefaultProps } from '../utils/shared-props'
import NimblePicker from './picker'
import data from '../../data'
import NimblePicker from './nimble-picker'
import { PickerPropTypes, PickerDefaultProps } from '../../utils/shared-props'
export default class Picker extends React.PureComponent {
render() {

View File

@ -1,9 +1,9 @@
import React from 'react'
import PropTypes from 'prop-types'
import { PreviewPropTypes, PreviewDefaultProps } from '../utils/shared-props'
import { NimbleEmoji, Skins } from '.'
import { getData } from '../utils'
import { getData } from '../../utils'
import { NimbleEmoji, Skins } from '..'
import { PreviewPropTypes, PreviewDefaultProps } from '../../utils/shared-props'
export default class NimblePreview extends React.PureComponent {
constructor(props) {

View File

@ -1,7 +1,9 @@
import React from 'react'
import data from '../data'
import { PreviewPropTypes, PreviewDefaultProps } from '../utils/shared-props'
import NimblePreview from './preview'
import data from '../../data'
import NimblePreview from './nimble-preview'
import { PreviewPropTypes, PreviewDefaultProps } from '../../utils/shared-props'
export default class Preview extends React.PureComponent {
render() {

View File

@ -1,7 +1,8 @@
import React from 'react'
import PropTypes from 'prop-types'
import NimbleEmojiIndex from '../utils/emoji-index'
import { SearchPropTypes, SearchDefaultProps } from '../utils/shared-props'
import NimbleEmojiIndex from '../../utils/emoji-index'
import { SearchPropTypes, SearchDefaultProps } from '../../utils/shared-props'
export default class NimbleSearch extends React.PureComponent {
constructor(props) {

View File

@ -1,7 +1,9 @@
import React from 'react'
import data from '../data'
import { SearchPropTypes, SearchDefaultProps } from '../utils/shared-props'
import NimbleSearch from './search'
import data from '../../data'
import NimbleSearch from './nimble-search'
import { SearchPropTypes, SearchDefaultProps } from '../../utils/shared-props'
export default class Search extends React.PureComponent {
render() {