Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ContactApp-AWS
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Irina Kuzmanovic
ContactApp-AWS
Commits
410d4e40
Commit
410d4e40
authored
1 year ago
by
Irina Kuzmanovic
Browse files
Options
Downloads
Patches
Plain Diff
Added style for authenticator
parent
734c1dbf
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/App.tsx
+0
-1
0 additions, 1 deletion
src/App.tsx
src/Authenticator.tsx
+66
-18
66 additions, 18 deletions
src/Authenticator.tsx
with
66 additions
and
19 deletions
src/App.tsx
+
0
−
1
View file @
410d4e40
import
Router
from
"
./routes
"
;
import
ThemeProvider
from
"
./theme
"
;
import
{
Auth
}
from
"
./Authenticator
"
;
export
default
function
App
()
{
...
...
This diff is collapsed.
Click to expand it.
src/Authenticator.tsx
+
66
−
18
View file @
410d4e40
import
{
Authenticator
}
from
"
@aws-amplify/ui-react
"
;
import
{
Authenticator
,
Theme
,
ThemeProvider
,
useTheme
,
}
from
"
@aws-amplify/ui-react
"
;
import
"
@aws-amplify/ui-react/styles.css
"
;
import
Button
from
"
@mui/material/Button
"
;
import
{
ReactNode
}
from
"
react
"
;
import
styled
from
"
@emotion/styled
"
;
import
palette
from
"
./theme/palette
"
;
type
Props
=
{
children
:
ReactNode
;
};
const
CenteredAuthenticator
=
styled
(
Authenticator
)
`
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
`
;
export
function
Auth
({
children
}:
Props
)
{
const
{
tokens
}
=
useTheme
();
const
theme
:
Theme
=
{
name
:
"
Auth Theme
"
,
tokens
:
{
colors
:
{
background
:
{
secondary
:
{
value
:
palette
.
light
.
primary
.
main
,
},
},
font
:
{
interactive
:
{
value
:
palette
.
light
.
primary
.
main
,
},
},
brand
:
{
primary
:
{
"
80
"
:
palette
.
light
.
primary
.
main
,
"
90
"
:
palette
.
light
.
primary
.
light
,
},
},
},
components
:
{
tabs
:
{
item
:
{
_focus
:
{
color
:
{
value
:
palette
.
light
.
primary
.
main
,
},
},
_hover
:
{
color
:
{
value
:
tokens
.
colors
.
white
.
value
,
},
},
_active
:
{
color
:
{
value
:
palette
.
light
.
primary
.
main
,
},
},
},
},
},
},
};
return
(
<
Authenticator
>
{
({
user
})
=>
{
return
(
<
div
>
{
children
}
{
/* <Button
variant="contained"
onClick={signOut}
sx={{ position: "fixed", top: "100px", right: "20px" }}
>
Sign out
</Button> */
}
</
div
>
);
}
}
</
Authenticator
>
<
ThemeProvider
theme
=
{
theme
}
>
<
CenteredAuthenticator
>
{
children
}
</
CenteredAuthenticator
>
</
ThemeProvider
>
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
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