Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

docs(Examples): fix imports in all examples to TS style #631

Merged
merged 4 commits into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions build/tsconfig.docs.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extends": "./tsconfig.common.json",
"compilerOptions": {
"module": "esnext",
"allowSyntheticDefaultImports": true
"module": "esnext"
},
"include": [
"../src",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Accordion } from '@stardust-ui/react'

const panels = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Accordion } from '@stardust-ui/react'

const panels = [
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Accordion/Types/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Accordion, Button } from '@stardust-ui/react'

class AccordionExampleList extends React.Component {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'

Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Accordion/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import Types from './Types'
import Variations from './Variations'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Icon, Button, Animation, Provider } from '@stardust-ui/react'

const spinner = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Attachment } from '@stardust-ui/react'

class AttachmentActionExampleShorthand extends React.Component {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Attachment } from '@stardust-ui/react'

const AttachmentDescriptionExampleShorthand = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Attachment } from '@stardust-ui/react'

const AttachmentHeaderExampleShorthand = () => <Attachment header="Strategy.docx" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Attachment } from '@stardust-ui/react'

const AttachmentIconExampleShorthand = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Attachment } from '@stardust-ui/react'

const AttachmentExampleShorthand = () => <Attachment header="Document.docx" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Attachment } from '@stardust-ui/react'

const AttachmentProgressExampleShorthand = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Attachment } from '@stardust-ui/react'

class AttachmentActionableExampleShorthand extends React.Component {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar } from '@stardust-ui/react'

const AvatarExampleShorthand = () => (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Avatar/Types/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar } from '@stardust-ui/react'

const status = { color: 'green', icon: 'check', title: 'Available' }
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Avatar/Usage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar } from '@stardust-ui/react'

const status = { color: 'green', icon: 'check', title: 'Available' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar } from '@stardust-ui/react'

const getInitials = name => name.split(' ').map(word => `${word[0]}.`)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar } from '@stardust-ui/react'

const AvatarExampleImageShorthand = () => <Avatar image="public/images/avatar/small/matt.jpg" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar, Icon } from '@stardust-ui/react'

const AvatarExampleImageCustomizationShorthand = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar } from '@stardust-ui/react'

const AvatarExampleLabelShorthand = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar } from '@stardust-ui/react'

const AvatarExampleNameShorthand = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'lodash'
import React from 'react'
import * as _ from 'lodash'
import * as React from 'react'
import { Avatar } from '@stardust-ui/react'

const statusProps = { icon: 'check', color: 'green', title: 'Available' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar } from '@stardust-ui/react'

const AvatarExampleStatusShorthand = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar, Grid, Status, Text } from '@stardust-ui/react'

const defaultAvatar = (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Avatar/Variations/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'

Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Avatar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import Types from './Types'
import Variations from './Variations'
import Usage from './Usage'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonGroupCircularExampleShorthand = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonGroupExampleShorthand = () => (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Button/Groups/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExampleDisabled = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button, Icon, Text } from '@stardust-ui/react'

const ButtonExampleDisabled = () => (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Button/States/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExample = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExample = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExampleContentAndIcon = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button, Icon, Text } from '@stardust-ui/react'

const ButtonExampleContentAndIcon = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExampleEmphasis = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExampleEmphasis = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExampleIcon = () => <Button icon="book" primary />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button, Icon } from '@stardust-ui/react'

const ButtonExampleIcon = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExampleIconOnly = () => <Button icon="book" iconOnly primary />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button, Icon } from '@stardust-ui/react'

const ButtonExampleIconOnly = () => (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Button/Types/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button, Provider } from '@stardust-ui/react'

const ButtonUsageExampleShorthand = () => (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Button/Usage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExampleCircular = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button, Icon } from '@stardust-ui/react'

const ButtonExampleCircular = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExampleEmphasisCircular = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button, Icon } from '@stardust-ui/react'

const ButtonExampleEmphasisCircular = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExampleFluid = () => <Button fluid content="Fits to Container" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExampleFluid = () => <Button fluid>Fits to Container</Button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button } from '@stardust-ui/react'

const ButtonExampleTextShorthand = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Button, Icon, Text } from '@stardust-ui/react'

const ButtonExampleText = () => (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Button/Variations/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'

Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import Types from './Types'
import Variations from './Variations'
import States from './States'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar, Chat, Divider } from '@stardust-ui/react'

const janeAvatar = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar, Chat } from '@stardust-ui/react'

const [janeAvatar, johnAvatar] = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Avatar, Chat, Provider } from '@stardust-ui/react'

const janeAvatar = {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Chat/Types/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'

Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/components/Chat/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import Types from './Types'

const ChatExamples = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { Divider } from '@stardust-ui/react'

const DividerExampleShorthand = () => <Divider />
Expand Down
Loading