Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
4beac9ed
Commit
4beac9ed
authored
2 years ago
by
Loïc Correnson
Committed by
David Bühler
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[dome] icon & icon-button visibility & display
parent
eeee3df0
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ivette/src/dome/renderer/controls/icons.tsx
+15
-5
15 additions, 5 deletions
ivette/src/dome/renderer/controls/icons.tsx
with
15 additions
and
5 deletions
ivette/src/dome/renderer/controls/icons.tsx
+
15
−
5
View file @
4beac9ed
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
import
_
from
'
lodash
'
;
import
_
from
'
lodash
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
classes
}
from
'
dome/misc/utils
'
;
import
{
classes
,
styles
}
from
'
dome/misc/utils
'
;
import
Gallery
from
'
./gallery.json
'
;
import
Gallery
from
'
./gallery.json
'
;
import
'
./style.css
'
;
import
'
./style.css
'
;
...
@@ -84,7 +84,7 @@ export function SVG(props: SVGprops): null | JSX.Element {
...
@@ -84,7 +84,7 @@ export function SVG(props: SVGprops): null | JSX.Element {
width
=
{
size
}
width
=
{
size
}
style
=
{
{
bottom
:
offset
}
}
style
=
{
{
bottom
:
offset
}
}
viewBox
=
{
viewBox
}
viewBox
=
{
viewBox
}
className
=
{
className
}
className
=
{
className
}
>
>
{
title
&&
<
title
>
{
title
}
</
title
>
}
{
title
&&
<
title
>
{
title
}
</
title
>
}
<
path
d
=
{
path
}
fill
=
{
fill
}
/>
<
path
d
=
{
path
}
fill
=
{
fill
}
/>
...
@@ -100,6 +100,10 @@ export function SVG(props: SVGprops): null | JSX.Element {
...
@@ -100,6 +100,10 @@ export function SVG(props: SVGprops): null | JSX.Element {
export
interface
IconProps
extends
SVGprops
{
export
interface
IconProps
extends
SVGprops
{
/** Additional class name(s). */
/** Additional class name(s). */
className
?:
string
;
className
?:
string
;
/** Display (default is true). */
display
?:
boolean
;
/** Visibility (default is true). */
visible
?:
boolean
;
/** Additional DIV style. */
/** Additional DIV style. */
style
?:
React
.
CSSProperties
;
style
?:
React
.
CSSProperties
;
/** Fill style property. */
/** Fill style property. */
...
@@ -115,10 +119,16 @@ export interface IconProps extends SVGprops {
...
@@ -115,10 +119,16 @@ export interface IconProps extends SVGprops {
export
function
Icon
(
props
:
IconProps
):
JSX
.
Element
{
export
function
Icon
(
props
:
IconProps
):
JSX
.
Element
{
const
{
const
{
id
,
title
,
onClick
,
fill
,
id
,
title
,
onClick
,
fill
,
size
,
className
=
''
,
offset
,
style
,
size
,
className
,
offset
,
style
,
visible
=
true
,
display
=
true
,
}
=
props
;
}
=
props
;
const
divClass
=
classes
(
'
dome-xIcon
'
,
className
);
const
divClass
=
classes
(
const
divStyle
=
fill
?
{
fill
,
...
style
}
:
style
;
'
dome-xIcon
'
,
!
visible
&&
'
dome-control-hidden
'
,
!
display
&&
'
dome-control-erased
'
,
className
);
const
divStyle
=
styles
(
fill
&&
{
fill
},
style
);
return
(
return
(
<
div
<
div
className
=
{
divClass
}
className
=
{
divClass
}
...
...
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