Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mirador Video
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
IIIF
Mirador
Mirador Video
Commits
a197f241
Commit
a197f241
authored
6 years ago
by
Jack Reed
Committed by
Chris Beer
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
keep material themeing within Mirador, do not leak out external styles/classes
parent
9eefe93d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
__tests__/src/components/App.test.js
+2
-2
2 additions, 2 deletions
__tests__/src/components/App.test.js
src/components/App.js
+18
-6
18 additions, 6 deletions
src/components/App.js
src/styles/index.scss
+0
-5
0 additions, 5 deletions
src/styles/index.scss
with
20 additions
and
13 deletions
__tests__/src/components/App.test.js
+
2
−
2
View file @
a197f241
...
...
@@ -11,7 +11,7 @@ describe('App', () => {
config
=
{{
theme
:
'
light
'
}}
/>
,
);
expect
(
wrapper
.
find
(
'
div.mirador-app
'
).
length
).
toBe
(
1
);
expect
(
wrapper
.
dive
().
find
(
'
div.mirador-app
'
).
length
).
toBe
(
1
);
});
describe
(
'
FullScreen
'
,
()
=>
{
...
...
@@ -23,7 +23,7 @@ describe('App', () => {
config
=
{{
theme
:
'
light
'
}}
/>
,
);
expect
(
wrapper
.
find
(
'
FullScreen
'
).
first
().
prop
(
'
enabled
'
)).
toEqual
(
true
);
expect
(
wrapper
.
dive
().
find
(
'
FullScreen
'
).
first
().
prop
(
'
enabled
'
)).
toEqual
(
true
);
});
});
});
This diff is collapsed.
Click to expand it.
src/components/App.js
+
18
−
6
View file @
a197f241
import
React
,
{
Component
}
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
CssBaseline
from
'
@material-ui/core/CssBaseline
'
;
import
{
MuiThemeProvider
,
createMuiTheme
}
from
'
@material-ui/core/styles
'
;
import
classNames
from
'
classnames
'
;
import
{
MuiThemeProvider
,
createMuiTheme
,
withStyles
}
from
'
@material-ui/core/styles
'
;
import
Fullscreen
from
'
react-fullscreen-crossbrowser
'
;
import
WorkspaceControlPanel
from
'
./WorkspaceControlPanel
'
;
import
Workspace
from
'
../containers/Workspace
'
;
...
...
@@ -17,7 +17,9 @@ class App extends Component {
* @return {String} - HTML markup for the component
*/
render
()
{
const
{
workspace
,
setWorkspaceFullscreen
,
config
}
=
this
.
props
;
const
{
workspace
,
setWorkspaceFullscreen
,
config
,
classes
,
}
=
this
.
props
;
const
theme
=
createMuiTheme
({
palette
:
{
type
:
config
.
theme
,
...
...
@@ -28,9 +30,8 @@ class App extends Component {
});
return
(
<
div
className
=
{
ns
(
'
app
'
)}
>
<
div
className
=
{
classNames
(
classes
.
background
,
ns
(
'
app
'
)
)
}
>
<
MuiThemeProvider
theme
=
{
theme
}
>
<
CssBaseline
/>
<
Fullscreen
enabled
=
{
workspace
.
isFullscreenEnabled
}
onChange
=
{
isFullscreenEnabled
=>
setWorkspaceFullscreen
(
isFullscreenEnabled
)}
...
...
@@ -47,6 +48,7 @@ class App extends Component {
App
.
propTypes
=
{
config
:
PropTypes
.
object
.
isRequired
,
// eslint-disable-line react/forbid-prop-types
workspace
:
PropTypes
.
object
,
// eslint-disable-line react/forbid-prop-types
classes
:
PropTypes
.
object
.
isRequired
,
// eslint-disable-line react/forbid-prop-types,
setWorkspaceFullscreen
:
PropTypes
.
func
,
};
...
...
@@ -55,4 +57,14 @@ App.defaultProps = {
setWorkspaceFullscreen
:
()
=>
{},
};
export
default
App
;
/**
Material UI style overrides
@private
*/
const
styles
=
theme
=>
({
background
:
{
background
:
theme
.
palette
.
background
.
default
,
},
});
export
default
withStyles
(
styles
)(
App
);
This diff is collapsed.
Click to expand it.
src/styles/index.scss
+
0
−
5
View file @
a197f241
@import
'variables'
;
body
{
background
:
$white
;
height
:
100%
;
}
.mirador
{
&
-workspace
{
bottom
:
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment