Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature | support label style prop #15

Merged
merged 3 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/dagshub/organization/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ export interface HeaderProps {
orgSite?: string;
orgPlan: string;
orgLink: string;
badgeLink?:string;
badgeLink?: string;
}

export function Header(props: HeaderProps) {
return (
<div className="organization-header">
<a href={props.badgeLink??undefined}className="organization-header__org-image">
<img src={props.orgImageSource}></img>
<a href={props.badgeLink ?? undefined} className="organization-header__org-image">
<img src={props.orgImageSource}></img>
</a>
<div className="org-info">
<div className={'org-upper-info'}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ export function AddMemberModal({
label={`Add new ${isTeam ? 'team' : 'organization'} ${
isOrg && isAdmin ? 'admin' : 'member'
}`}
fullWidth={true}
onClick={() =>
fullWidth={true}
onClick={() =>
addMembers({
team,
access,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface TeamTableProps {
copyInvitationAction: (args?: any) => void;
existingTeamNames: string[];
addTeamReposLink: string;
addTeamReposAnalyticsEventAction:()=>void;
addTeamReposAnalyticsEventAction: () => void;
}

export interface OnEditTeamInput {
Expand Down Expand Up @@ -399,7 +399,11 @@ export function TeamTable({
columns: [
<span>
This team doesn't have repositories yet{' '}
<a onClick={addTeamReposAnalyticsEventAction} style={{ textDecoration: 'underline', color: 'black' }} href={addTeamReposLink}>
<a
onClick={addTeamReposAnalyticsEventAction}
style={{ textDecoration: 'underline', color: 'black' }}
href={addTeamReposLink}
>
Add team repositories
</a>
</span>
Expand Down
8 changes: 8 additions & 0 deletions src/components/elements/dropdown/dropdown.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.dagshub-dropdown {
position: relative;
white-space: pre-wrap;
font-family: 'Inter', sans-serif;

.dagshub-dropdown__box {
font-weight: 600;
Expand All @@ -19,6 +20,13 @@
cursor: pointer;
}

.dagshub-dropdown__dropdown_title {
font-size: 14px;
font-weight: 600;
line-height: 20px;
padding-bottom: 8px;
}

.dagshub-dropdown__options {
border-radius: 6px;
gap: 16px;
Expand Down
6 changes: 4 additions & 2 deletions src/components/forms/input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface InputProps {
onClick?: () => void;
focusInput?: boolean;
searchIcon?: boolean;
labelStyle?: React.CSSProperties | undefined;
}

export const Input = React.forwardRef<HTMLDivElement, InputProps>(
Expand All @@ -40,7 +41,8 @@ export const Input = React.forwardRef<HTMLDivElement, InputProps>(
onChange = () => {},
onClick = () => {},
focusInput = false,
searchIcon = false
searchIcon = false,
labelStyle
},
ref
) => {
Expand All @@ -59,7 +61,7 @@ export const Input = React.forwardRef<HTMLDivElement, InputProps>(

return (
<div ref={ref} className={classes} style={{ maxWidth: rootMaxWidth, width: rootWidth }}>
{label && <label>{label}</label>}
{label && <label style={{ ...labelStyle }}>{label}</label>}
<div className={'search-icon'}>
{searchIcon && <Icon width={17} height={17} fill="#172D32" icon="outline-search" />}
</div>
Expand Down