Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
chore: some refacs and adjusts
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed May 7, 2018
1 parent ffa8086 commit b1c3186
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 34 deletions.
2 changes: 2 additions & 0 deletions examples/basic/src/components/Alert.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Alert } from './Alert'
export const meta = doc('Alert')
.category('Components')

# Alert

## Basic usage

<Alert>Some message</Alert>
Expand Down
2 changes: 2 additions & 0 deletions examples/basic/src/components/Button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ export const meta = doc('Button')

# Button

## Basic usage

<Button>Click me</Button>
6 changes: 0 additions & 6 deletions examples/basic/src/hocs/withProps.doc.jsx

This file was deleted.

8 changes: 8 additions & 0 deletions examples/basic/src/hocs/withProps.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { doc } from 'docz'

export const meta = doc('withProp')
.category('Hocs')

# withProps

This section talk about withProps hoc
3 changes: 2 additions & 1 deletion examples/basic/src/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ export const meta = doc('Overview')
.route('/')
.order(1)

## Introduction
# Introduction

A design system can help establish a common vocabulary between everyone in an organization. That’s why I’ve spent a great deal of time coming up with structure and naming for Vue Design System that would make sense. To start opening it up, let’s go through each layer in detail and what the terms mean:

- *Principles* are the foundation of the whole system. They form the basis of a good product and help the team with decision making. They are there to guide you and your team when working with the myriad parts of the system and help you do better and more informed decisions.
Expand Down
3 changes: 3 additions & 0 deletions packages/docz-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@
"resolve": "^1.7.1",
"shelljs": "^0.8.1",
"thread-loader": "^1.1.5",
"to-vfile": "^4.0.0",
"ulid": "^2.3.0",
"unified": "^6.2.0",
"unist-util-find": "^1.0.1",
"unist-util-is": "^2.1.2",
"url-loader": "^1.0.1",
"webpack": "^4.7.0",
"webpack-chain": "^4.6.0",
Expand Down
28 changes: 3 additions & 25 deletions packages/docz-theme-default/src/components/Doc.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { SFC } from 'react'
import styled from 'react-emotion'
import { DocObj } from 'docz'
import * as Icon from 'react-feather'

import * as colors from '../styles/colors'

Expand All @@ -12,7 +11,7 @@ const Container = styled('div')`
margin: 0 auto;
`

const Title = styled('h2')`
const Title = styled('h1')`
position: relative;
font-size: 48px;
font-weight: 200;
Expand All @@ -29,29 +28,8 @@ const Title = styled('h2')`
}
`

const IconLink = styled(Icon.Link)`
margin-right: 10px;
`

const Filepath = styled('div')`
display: flex;
align-items: center;
margin: 15px 0 0;
color: ${colors.GRAY_MEDIUM};
`

export const Doc: SFC<DocObj> = ({
id,
name,
filepath,
component: Component,
}) => (
export const Doc: SFC<DocObj> = ({ id, component: Component }) => (
<Container key={id}>
<Title>{name}</Title>
<Filepath>
<IconLink size={15} />
<code>{filepath}</code>
</Filepath>
<Component />
<Component components={{ h1: Title }} />
</Container>
)
2 changes: 1 addition & 1 deletion packages/docz/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { Doc, DocObj, Entry, Section } from './Doc'
export { Doc, DocObj, Entry } from './Doc'
export { doc } from './Doc'
export { Docs } from './Docs'
export { theme } from './theme'
2 changes: 1 addition & 1 deletion packages/docz/src/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare module '@sindresorhus/slugify'
declare module 'pascalcase'
declare module 'pascalcase''

0 comments on commit b1c3186

Please sign in to comment.