-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #324 from performant-software/feature/cdp322_models
CDP #33 - Core data models
- Loading branch information
Showing
16 changed files
with
288 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// @flow | ||
|
||
import React from 'react'; | ||
import { Image } from 'lucide-react'; | ||
|
||
type Props = { | ||
alt?: string, | ||
src: string | ||
}; | ||
|
||
const HeaderImage = (props: Props) => ( | ||
<div | ||
className='relative w-full h-[200px] flex-grow-0 flex-shrink-0 bg-muted/20 z-0' | ||
> | ||
<div | ||
className='absolute top-0 left-0 w-full h-full flex justify-center items-center' | ||
> | ||
<Image | ||
className='h-20 w-20 text-gray-400' | ||
strokeWidth={1} | ||
/> | ||
</div> | ||
<div | ||
className='absolute top-0 left-0 w-full h-full flex justify-center items-center' | ||
> | ||
<img | ||
alt={props.alt} | ||
className='object-cover h-full w-full' | ||
src={props.src} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
|
||
export default HeaderImage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// @flow | ||
|
||
import React from 'react'; | ||
import _ from 'underscore'; | ||
|
||
type Item = { | ||
label: string, | ||
value: string | ||
}; | ||
|
||
type Props = { | ||
items: Array<Item> | ||
}; | ||
|
||
const KeyValueList = (props: Props) => ( | ||
<ol | ||
className='text-sm mt-4 leading-6 overflow-hidden' | ||
> | ||
{ _.map(props.items, ({ label, value }) => ( | ||
<li | ||
key={label} | ||
className='mb-2' | ||
> | ||
<div | ||
className='text-muted' | ||
> | ||
{ label } | ||
</div> | ||
<div | ||
className='font-medium overflow-hidden text-ellipsis' | ||
> | ||
{ value } | ||
</div> | ||
</li> | ||
))} | ||
</ol> | ||
); | ||
|
||
export default KeyValueList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// @flow | ||
|
||
import BaseService from './BaseService'; | ||
|
||
/** | ||
* Class responsible for making API calls to the Core Data `organizations` API endpoint. | ||
*/ | ||
class Organizations extends BaseService { | ||
/** | ||
* Returns the organizations route name. | ||
* | ||
* @returns {string} | ||
*/ | ||
getRoute() { | ||
return 'organizations'; | ||
} | ||
} | ||
|
||
export default Organizations; |
Oops, something went wrong.