Skip to content

Commit 95d04fb

Browse files
authored
Merge pull request #876 from tomkp/feature/show-version-in-examples
feat: show version in examples header
2 parents bc98e30 + a6bc973 commit 95d04fb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

examples/main.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ControlledExample } from './ControlledExample';
66
import { StyledExample } from './StyledExample';
77
import { SnapPointsExample } from './SnapPointsExample';
88
import { PercentageExample } from './PercentageExample';
9+
import { version } from '../package.json';
910
import './styles.css';
1011

1112
type Example =
@@ -31,7 +32,7 @@ function App() {
3132
return (
3233
<div className="app">
3334
<nav className="nav">
34-
<h1>React Split Pane</h1>
35+
<h1>React Split Pane <span className="version">v{version}</span></h1>
3536
<div className="nav-buttons">
3637
{examples.map(({ id, label, shortLabel }) => (
3738
<button

examples/styles.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ body {
3737
font-weight: 600;
3838
}
3939

40+
.nav h1 .version {
41+
font-weight: 400;
42+
font-size: 0.875rem;
43+
color: #888;
44+
}
45+
4046
.nav-buttons {
4147
display: flex;
4248
gap: 0.5rem;

0 commit comments

Comments
 (0)