Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Button from '@enact/moonstone/Button';
import IconButton from '@enact/moonstone/IconButton';
import {Link} from 'react-router-dom';
import React from 'react';

Expand All @@ -7,12 +7,11 @@ import css from './ButtonToSamples.module.less';
const ButtonToSamples = () => (
<div className={css.buttonContainer}>
<Link to="/" className={css.backLink}>
<Button
className={css.backButton}
style={{zIndex: 1}}
<IconButton
aria-label="Back To Samples"
>
Back To Samples
</Button>
arrowhookleft
</IconButton>
</Link>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
.backLink {
z-index: 1;
margin-right: 5%;

.backButton {
z-index: 2;
transform: translate(0px, -100px);
transition: all .5s ease-in-out;
}

&:hover {
.backButton {
transform: translate(0px, 0px);
}
}
z-index: 2;
}

.buttonContainer {
display: flex;
flex-direction: row;
justify-content: flex-end;
}
padding: 33px 6px;
}
26 changes: 18 additions & 8 deletions enact-all-samples/src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import kind from '@enact/core/kind';
import MoonstoneDecorator from '@enact/moonstone/MoonstoneDecorator';
import {HashRouter as Router, Route} from 'react-router-dom';
import React from 'react';
import {render} from 'react-dom';
Expand Down Expand Up @@ -52,14 +54,22 @@ console.error = (...args) => {
};
/* eslint-enable no-console */

const appElement = (
<Router>
<div>
<ButtonToSamples />
{routes.map((route, index) => <Route key={index} {...route} />)}
</div>
</Router>
);
const SampleRoutes = MoonstoneDecorator(kind({
name: 'SampleRoutes',

render: () => {
return (
<Router>
<div>
<ButtonToSamples />
{routes.map((route, index) => <Route key={index} {...route} />)}
</div>
</Router>
);
}
}));

const appElement = <SampleRoutes />;

// In a browser environment, render the app to the document.
if (typeof window !== 'undefined') {
Expand Down
5 changes: 5 additions & 0 deletions pattern-expandablelist-object/src/views/MainPanel.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import ExpandableList from '@enact/moonstone/ExpandableList';
import {Header, Panel} from '@enact/moonstone/Panels';
import kind from '@enact/core/kind';
import PropTypes from 'prop-types';
import React from 'react';

const MainPanel = kind({
name: 'MainPanel',

propTypes: {
title: PropTypes.string
},

render: (props) => (
<Panel {...props}>
<Header title={props.title} />
Expand Down
3 changes: 2 additions & 1 deletion pattern-layout/src/views/MainPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const GridItem = kind({
name: 'GridItem',
propTypes: {
index: PropTypes.number,
items: PropTypes.array
items: PropTypes.array,
onSelect: PropTypes.func
},
handlers: {
onSelect: (ev, {index, onSelect}) => onSelect({index})
Expand Down