mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 02:19:52 +02:00
Show View Source link next to example title (#2577)
Add a view source link in Slate's examples to make it easy to see how an example was created
This commit is contained in:
committed by
Sunny Hirai
parent
8e659dbd28
commit
9694b22846
@@ -291,7 +291,14 @@ export default class App extends React.Component {
|
|||||||
<Switch>
|
<Switch>
|
||||||
{EXAMPLES.map(([name, Component, path]) => (
|
{EXAMPLES.map(([name, Component, path]) => (
|
||||||
<Route key={path} exact path={path}>
|
<Route key={path} exact path={path}>
|
||||||
<ExampleTitle>{name}</ExampleTitle>
|
<ExampleTitle>
|
||||||
|
{name}
|
||||||
|
<Link
|
||||||
|
href={`https://github.com/ianstormtaylor/slate/blob/master/examples${path}`}
|
||||||
|
>
|
||||||
|
(View Source)
|
||||||
|
</Link>
|
||||||
|
</ExampleTitle>
|
||||||
</Route>
|
</Route>
|
||||||
))}
|
))}
|
||||||
</Switch>
|
</Switch>
|
||||||
|
Reference in New Issue
Block a user