squiggle/foretold/components/showcase/entries/Showcase_AgentLink.re

49 lines
9.3 KiB
ReasonML
Raw Normal View History

2022-01-12 07:33:04 +00:00
let image1 = "https://media1.popsugar-assets.com/files/thumbor/PqBqxo_cWMRP99nvp73HN0lSqr0/fit-in/1024x1024/filters:format_auto-!!-:strip_icc-!!-/2016/01/11/797/n/1922153/940d7f6ffea5ccb7_grid-cell-30798-1452255774-1/i/Photos-People-Freckles.jpg";
let image2 = "https://www.w3schools.com/howto/img_avatar.png";
let image3 = "https://secure.gravatar.com/avatar/d9032fc9ac4a2f815ae8f88a0bdd97f2?s=96&d=mm&r=g";
let image4 = "https://avatars1.githubusercontent.com/u/377065?v=4";
let bot1image = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxITEhUQEhAVFRUXGBUVFhUVFxAWFRUVFRcWFhUVFRUYHSggGBolHRUWIjEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OFhAQFysgFR0rKysrKysrLSsrKy0tLS0tKystLS0tKy0tKy0tKystKy0tKy0rNy03LS03Ky0rNystLf/AABEIAOEA4QMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAAAQQFBgcDAgj/xABFEAABAwIDBQUFBgQEAwkAAAABAAIDBBEFITEGEkFRYQcTInGBMkJSkcEUYnKhsfAjNILRc5LC8RUzUzVDVGOisrPh4v/EABkBAQEBAQEBAAAAAAAAAAAAAAABAgMEBf/EACQRAQACAgICAgIDAQAAAAAAAAABAgMRITEEEhNBMmEiUXEU/9oADAMBAAIRAxEAPwDQkIQtIEBCEAQhCE0BCEKAQhCAQEIQIhC5zztY0ve5rWjVziAB5kpodEKp1PaDRjvBE50xjaXncB3SAcwHHI+YVak7S6l5/hUoa3gXHMjz0XWuK0/TM2iGoEJAsuPaDXcIIv8AMSpHB+0OR8jYZqXdLvea7IAZ3O9wW58e8Qe8NAQoDB9sqKpIayYNeb+CTwEkG3hvkdOCn1wmsx21sIQhQCSyVCBEJUisBUi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T5Dq2/wjkmHF7Ty55Mvqe4h2wOaf4VGwD/zJHE/JoA/NN6PtrkDv41Cwt493I8OHkHXB8rrMKh/FNHvXv/5sfWnOuS0vqfZnaenro+9p33t7TDk9h5OH1U01y+V9kMe
let links = () =>
<div>
<h3> {"Bot" |> ReasonReact.string} </h3>
<AgentLink
agent={AgentLink.Agent.makeBot(
~name="Stan Bot",
~owner=
AgentLink.Agent.makeUser(
~name="Samantha Grey",
~image=image3,
(),
),
(),
)}
/>
<h3> {"User Simple" |> ReasonReact.string} </h3>
<AgentLink
agent={AgentLink.Agent.makeUser(
~name="Stan Lee",
~image=image1,
(),
)}
/>
<h3> {"User Ozzie" |> ReasonReact.string} </h3>
<AgentLink
agent={AgentLink.Agent.makeUser(
~name="Ozzie Gooen",
~image=image4,
(),
)}
/>
<h3> {"User with long name" |> ReasonReact.string} </h3>
<AgentLink
agent={AgentLink.Agent.makeUser(
~name="Stan Ben Goldmemberfeinsteinwatkins",
~image=image2,
(),
)}
/>
</div>;
let entry = EntryTypes.(entry(~title="AgentLink", ~render=links));