Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
fca0a39c
Commit
fca0a39c
authored
Feb 02, 2017
by
Vlad Frolov
Committed by
Tim Neutkens
Feb 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples/with-react-md: Fixed "Cannot read property 'focus' of undefined" (#961)
parent
3e34430f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
index.js
examples/with-react-md/pages/index.js
+19
-11
No files found.
examples/with-react-md/pages/index.js
View file @
fca0a39c
import
Head
from
'next/head'
import
Head
from
'next/head'
import
Link
from
'next/link'
import
Link
from
'next/link'
import
{
PureComponent
}
from
'react'
import
Avatar
from
'react-md/lib/Avatars'
import
Avatar
from
'react-md/lib/Avatars'
import
Button
from
'react-md/lib/Buttons/Button'
import
Button
from
'react-md/lib/Buttons/Button'
import
FontIcon
from
'react-md/lib/FontIcons'
import
FontIcon
from
'react-md/lib/FontIcons'
...
@@ -28,17 +30,23 @@ const drawerHeaderChildren = [
...
@@ -28,17 +30,23 @@ const drawerHeaderChildren = [
/>
/>
]
]
const
NavigationLink
=
(
props
)
=>
{
class
NavigationLink
extends
PureComponent
{
const
{
href
,
as
,
children
,
...
_props
}
=
props
// NOTE: Don't try using Stateless (function) component here. `ref` is
// required by React-MD/AccessibleFakeButton, but Stateless components
// don't have one by design:
// https://github.com/facebook/react/issues/4936
render
()
{
const
{
href
,
as
,
children
,
...
_props
}
=
this
.
props
return
(
return
(
<
div
{...
_props
}
>
<
div
{...
_props
}
style
=
{{
padding
:
0
}
}
>
<
Link
href
=
{
href
}
as
=
{
as
}
>
<
Link
href
=
{
href
}
as
=
{
as
}
>
<
a
className
=
'md-list-tile'
style
=
{{
padding
:
0
,
overflow
:
'hidden'
}}
>
<
a
className
=
'md-list-tile md-list-tile--mini'
style
=
{{
width
:
'100%'
,
overflow
:
'hidden'
}}
>
{
children
}
{
children
}
<
/a
>
<
/a
>
<
/Link
>
<
/Link
>
<
/div
>
<
/div
>
)
)
}
}
}
export
default
()
=>
{
export
default
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment