Skip to content

Commit

Permalink
client: modify styling, add loading svg
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham-Lal committed May 14, 2024
1 parent 4dacac9 commit 27ef30b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 2 additions & 3 deletions client/src/components/card/claim-username.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[data-theme='dark'] {
--claim-border: #212122;
--username-bg: #1F1F21;
--username-bg: #212122;
--username-color: #FFF;
--username-input-bg: #0A0A0A;
--username-input-color: #fff;
Expand Down Expand Up @@ -45,15 +45,13 @@
}

#claim-username .username-input {
position: relative;
width: 100%;
height: 50px;
display: flex;
background-color: var(--username-bg);
border: 3px solid;
box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
color: var(--claim-border);
overflow: hidden;
}

#claim-username .username-input .domain {
Expand All @@ -80,6 +78,7 @@
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
font-size: 16px;
font-weight: 600;
letter-spacing: 1px;
Expand Down
4 changes: 3 additions & 1 deletion client/src/components/card/claim-username.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "./claim-username.css"
import { PiArrowUpRightBold } from "react-icons/pi";
import { PiArrowUpRightBold } from "react-icons/pi"
// import { LoadingSVG } from "../loading/svg"

const ClaimUsername = () => {
const handleUsernameSubmit = (e: React.FormEvent<HTMLFormElement>) => {
Expand All @@ -16,6 +17,7 @@ const ClaimUsername = () => {
<button className='submit-btn'>
<span>CLAIM</span>
<PiArrowUpRightBold size={20} color='#FFFFFF' />
{/* <LoadingSVG size={20} color='#FFFFFF' /> */}
</button>
</form>
)
Expand Down
7 changes: 4 additions & 3 deletions client/src/components/loading/svg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import "./style.css"

interface Props {
size: number
color ?: string
}

const LoadingSVG: React.FC<Props> = ({ size }) => {
const LoadingSVG: React.FC<Props> = ({ size, color }) => {
return (
<svg className="loading-spinner" width={size} height={size} viewBox={`0 0 16 16`} fill="none" data-view-component="true">
<circle cx="8" cy="8" r="7" stroke="currentColor" strokeOpacity="0.25" strokeWidth="2" vectorEffect="non-scaling-stroke" fill="none"></circle>
<path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" strokeWidth="2" strokeLinecap="round" vectorEffect="non-scaling-stroke"></path>
<circle cx="8" cy="8" r="7" stroke={color || "currentColor"} strokeOpacity="0.25" strokeWidth="2" vectorEffect="non-scaling-stroke" fill="none"></circle>
<path d="M15 8a7.002 7.002 0 00-7-7" stroke={color || "currentColor"} strokeWidth="2" strokeLinecap="round" vectorEffect="non-scaling-stroke"></path>
</svg>
)
}
Expand Down

0 comments on commit 27ef30b

Please sign in to comment.